1.1.0 • Published 2 years ago

react-native-block-component v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

React Native Customizable View Component


  • Now You Can Build React-Native UI More Faster And Clean

Get Started

npm.io

    import { Block } from "react-native-block-component";


   <Block flex backgroundColor="#03A9F4" >

      <Block flex row  padding={5} margin={5} backgroundColor="#80DEEA">
        <Block flex={2} center top  backgroundColor="#78909C">
          <Text>A</Text>
        </Block>

        <Block flex={1} center  backgroundColor="#039BE5">
          <Text>B</Text>
        </Block>
      </Block>

      <Block flex center row space='evenly'>
        <Block
          center
          width={150}
          padding={10}
          touchable
          card
        >
          <Text>Clickable</Text>
        </Block>
        <Block
          center
          width={150}
          padding={10}
          touchable
          backgroundColor="orange"
        >
          <Text>Clickable</Text>
        </Block>
      </Block>

    </Block>

Props

PropDefaultTypeDescription
rowfalseboolIf true, Elements display in a horizontal line
flexfalsebool -numberif true the flex value would be 1
spacefalsebetween -evenly - aroundspecify how the blocks distributed in the flex justifyContent
topfalseboolSet to true Align elements to the top
bottomfalseboolSet to true Align elements to the bottom
rightfalseboolSet to true Align elements to the right
leftfalseboolSet to true Align elements to the left
wrapfalseboolIf true wrap the block elements if exceeded the width
alignContentfalsecenter - flex-start - flex-endIf the Block children was wrapped wrap you need this props to place the elements top,bottom,...
backgroundColorundefinedstringSet the block backgroundColor
touchablefalseboolMake the element to be touchable TouchableOpacity accepts onPress
safefalsebooldisplay the Block with SafeAreaView
cardfalseboolAdd border and borderRadius to the Block
widthundefinednumberSet the block width
heightundefinednumberSet the block height
paddingundefinednumber-[numbers]if number add padding to al dimensions of Block if array of numbers would set to top,right,bottom,left padding
marginundefinednumber-[numbers]if number add margin to al dimensions of Block if array of numbers would set to top,right,bottom,left margin
1.1.0

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago