1.1.9 • Published 4 years ago

react-native-auto-responsive-screen v1.1.9

Weekly downloads
4
License
ISC
Repository
-
Last release
4 years ago

react-native-auto-responsive-screen

This dependency is used to make responsive appearance in accordance with the dimensions of the design.

Installation

$ cd project_name
$ yarn add react-native-auto-responsive-screen

or

$ cd project_name
$ npm install react-native-auto-responsive-screen

before

alt text

after

alt text

You need init first, this step is required

// file on root directory

import ResponsiveScreen from 'react-native-auto-responsive-screen'

/**
 * WIDTH AND HEIGHT BASE ON MOCKUP
 */
ResponsiveScreen.init(414, 852)

const App = () => {
  ...
};

next step

// font example
import ResponsiveScreen from 'react-native-auto-responsive-screen'

<Text style={{
    color: '#FFFFFF',
    fontSize: ResponsiveScreen.fontSize(14)
}}>dummy text</Text>
// component example
import ResponsiveScreen from 'react-native-auto-responsive-screen'

<TouchableOpacity style={{
    height: ResponsiveScreen.normalize(40),
    width: ResponsiveScreen.normalize(180),
    backgroundColor: '#CD3438',
    justifyContent: 'center',
    alignItems: 'center',
    borderRadius: ResponsiveScreen.normalize(5)
}}>
    ...
    
</TouchableOpacity>
1.1.9

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago