Skip to content

tuckerconnelly/react-native-ps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published