Skip to content

An utility component for pushing other elements and avoid `padding`, `margin` for React Native

Notifications You must be signed in to change notification settings

DCKT/spacer-native

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spacer-native

An utility component for pushing other elements and avoid padding, margin everywhere.

Usage

Install :

yarn add @dck/spacer-native

Web

import { Text } from 'react-native'
import Spacer from '@dck/spacer-native'

const App = () => {
  <>
    <Text>Hello</Text>
    <Spacer height={10} />
    <Text>world</Text>
  </>
}

ReasonML

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>
  </>
};

About

An utility component for pushing other elements and avoid `padding`, `margin` for React Native

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published