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

0.2.1 • Public • Published

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

Dependencies (0)

    Dev Dependencies (20)

    Package Sidebar

    Install

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

    Weekly Downloads

    277

    Version

    0.2.1

    License

    MIT

    Unpacked Size

    8.55 kB

    Total Files

    4

    Last publish

    Collaborators

    • cray0000