0.1.0 • Published 6 years ago

react-native-rem-stylesheet v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

react-native-rem-stylesheet

Tool to build all-device-capatible styles.

Install

yarn add react-native-rem-stylesheet

or

npm i --save react-native-rem-stylesheet

Demo

import React, { Component } from "react";
import { View, Text } from "react-native";
import StyleSheet from "react-native-rem-stylesheet";

export default class SomeComponent extends Component {
  render() {
    return (
      <View>
        <Text>Some text</Text>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  wrapper: {
    width: 320, //100% width
    height: 20, // will be 40 in 640 width device.
    padding: 10,
  },
  text: {
    fontSize: 12,
  },
});