0.0.6 • Published 8 years ago

react-native-style v0.0.6

Weekly downloads
1
License
GPL-3.0
Repository
-
Last release
8 years ago

With react-native-style you can use different templates for styles like media query in css. Use condition value as pixels, but value of style property in point as default in react-native. react-native-style has 2 variables for condition.

height - height of screen in pixels. width - width of screen in pixels.

Install

$ npm i react-native-style --save

Usage Example.

'use strict';
import React, {
  AppRegistry,
  Text,
  View
} from 'react-native';

import styleSheet from 'react-native-style';

class DemoApp extends Component {
  render() {
    return (
      <View style={styles.container}>
      <Text>Some Text</Text>
      </View>
    );
  }
}

const styles = styleSheet([{
  'height <= 750': {
  	container: {
      height: deviceHeight,
      width: deviceWidth,
      backgroundColor: '#8cc5b4'
    }
  }
}]);

AppRegistry.registerComponent('DemoApp', () => DemoApp);
0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago