https://github.com/dckt/spacer-native
An utility component for pushing other elements and avoid `padding`, `margin` for React Native
https://github.com/dckt/spacer-native
react react-native reason-react reason-react-native reasonml
Last synced: 18 days ago
JSON representation
An utility component for pushing other elements and avoid `padding`, `margin` for React Native
- Host: GitHub
- URL: https://github.com/dckt/spacer-native
- Owner: DCKT
- Created: 2019-05-01T08:43:42.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-25T11:42:50.000Z (almost 7 years ago)
- Last Synced: 2025-04-05T16:35:08.365Z (about 1 year ago)
- Topics: react, react-native, reason-react, reason-react-native, reasonml
- Language: OCaml
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spacer-native
An utility component for pushing other elements and avoid `padding`, `margin` everywhere.
## Usage
Install :
```console
yarn add @dck/spacer-native
```
### Web
```js
import { Text } from 'react-native'
import Spacer from '@dck/spacer-native'
const App = () => {
<>
Hello
world
>
}
```
### ReasonML
Add the module to your `bsconfig.json` file :
```
"bs-dependencies": [
...,
"@dck/spacer-native"
]
```
Use it in your app code :
```ocaml
[@react.component]
let make = () => {
<>
{"Hello" |> React.string}
{"World" |> React.string}
>
};
```