npm.io
0.0.1 • Published 5 years ago

react-native-block

Licence
MIT
Version
0.0.1
Deps
2
Size
8 kB
Vulns
1
Weekly
0
Stars
3

react-native-block

A simple and customizable wrapper component for React Native View.

Usage

Instead of writing this :

<View style={{ flex: 2, justifyContent: 'center', alignItems: 'center', marginTop: 20 }}>
  //Other components
</View>

You can just do this :

<Block flex={2} center middle mt={20}>
  // Your components
</Block>

For TouchableOpacity :

<TouchableBlock onPress={handler} center middle>
  // Your components
</TouchableBlock>