0.0.6 • Published 8 years ago
react-native-platform-stylesheet v0.0.6
React Native Platform Stylesheet
Seperated out the F8StyleSheet to a module.
Get started
npm install react-native-platform-stylesheet
Use it in your project:
import { create } from 'react-native-platform-stylesheet'; const Profile = () => ( <View style={styles.container}> {/* ... */} </View> ); const styles = create({ container: { flex: 1, ios: { backgroundColor: 'salmon' }, android: { backgroundColor: 'tomato' } } });
or
import { create } from 'react-native-platform-stylesheet'; const Profile = () => ( <View style={styles.container}> {/* ... */} </View> ); const styles = create({ container: { flex: 1 }, ios: { container: { backgroundColor: 'salmon' } }, android: { container: { backgroundColor: 'tomato' } } });
Note: in the second example, make sure that
ios
andandroid
styles are defined in the end of the object.