babel-plugin-react-native-web-pass-classname
v0.2.1
Published
[react-native-web] Pass className property when style property is passed.
Downloads
1,902
Maintainers
Readme
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