react-native-ps

0.0.7 • Public • Published

react-native-ps

Simple function to merge styles based on platform in React Native. ps stands for "platform styles."

Usage

import ps from 'react-native-ps'
 
const MyComponent = () =>
  <View style={styles.myComponent} />
 
const styles = ps({
  myComponent: {
    // Styles applied to all platforms
  },
 
 
  ios: {
    myComponent: {
      // iOS-specific styles
    },
  },
  android: {
    myComponent: {
      // Android-specific styles
    }
  },
  web: {
    myComponent: {
      // web-specific styles
    }
  },
})

Connect

Follow the creator on Twitter, @TuckerConnelly

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i react-native-ps

Weekly Downloads

1

Version

0.0.7

License

MIT

Last publish

Collaborators

  • tuckerconnelly