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