0.2.1 • Published 5 years ago

babel-plugin-react-native-web-pass-classname v0.2.1

Weekly downloads
366
License
MIT
Repository
github
Last release
5 years ago

babel-plugin-react-native-web-pass-classname

Pass className property whenever style is passed through.

It's useful when writing reusable components for react-native-web and when using react-native libs which were not optimized to also work for react-native-web.

Examples

Input:

const Foo = (props) =>
  <View
    style={[props.titleStyle, props.style]}
  />

Output:

const Foo = (props) =>
  <View
    style={[props.titleStyle, props.style]}
    className={props.className}
  />

License

MIT

(c) Decision Mapper - http://decisionmapper.com