An utility component for pushing other elements and avoid padding
, margin
everywhere.
Install :
yarn add @dck/spacer-native
import { Text } from 'react-native'
import Spacer from '@dck/spacer-native'
const App = () => {
<>
<Text>Hello</Text>
<Spacer height={10} />
<Text>world</Text>
</>
}
Add the module to your bsconfig.json
file :
"bs-dependencies": [
...,
"@dck/spacer-native"
]
Use it in your app code :
[@react.component]
let make = () => {
<>
<Text>{"Hello" |> React.string}</Text>
<Spacer height=10. />
<Text>{"World" |> React.string}</Text>
</>
};