react-native-stylesheet-to-css
v0.0.1
Published
Converts React Native stylesheet object to a CSS text
Downloads
1,050
Readme
react-native-stylesheet-to-css
Converts React Native stylesheet object to a CSS text
wapper: {
flex: 1,
flexDirection: 'column',
width: 200,
paddingBottom: 10,
backgroundColor: '#f2f2f2',
lineHeight: '1'
}
.wapper {
background-color:#f2f2f2;
display:-webkit-box;
display:-moz-box;
display:-ms-flexbox;
display:-webkit-flex;
display:flex;
-ms-flex-negative:1;
-ms-flex-positive:1;
-ms-flex-preferred-size:0%;
-webkit-box-flex:1;
-webkit-flex-basis:0%;
-webkit-flex-grow:1;
-webkit-flex-shrink:1;
flex-basis:0%;
flex-grow:1;
flex-shrink:1;
-ms-flex-direction:column;
-webkit-box-direction:normal;
-webkit-box-orient:vertical;
-webkit-flex-direction:column;
flex-direction:column;
line-height:1;
padding-bottom:10px;
width:200px;
}
Installation
$ npm install --save react-native-stylesheet-to-css
Usage
import transform from 'react-native-stylesheet-to-css';
console.log(transform({
wapper: {
flex: 1,
flexDirection: 'column',
width: 200,
paddingBottom: 10,//80
backgroundColor: '#f2f2f2',
lineHeight: '1'
}
}))