1.0.1 • Published 4 years ago

react-native-scale-view v1.0.1

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

react-native-scale-view

React Native 不同设备分辨率适配和设计稿尺寸单位 px 适配

Getting started

Install the library using either Yarn:

yarn add react-native-scale-view

or npm:

npm install --save react-native-scale-view

Using React Native >= 0.60

Usage Example

import ScaleView from 'react-native-scale-view';

const App = () => {
  return (
    <>
      <StatusBar barStyle="dark-content" />
      <SafeAreaView>
        <ScaleView designWidth={750}>
          {/* page */}
        </ScaleView>
      </SafeAreaView>
    </>
  );
};

Props

PropsDescriptionTypeDefault
designWidth设计稿宽number750