2.0.9 • Published 3 years ago
@berlitz/spacer v2.0.9
Spacer 
The Spacer component creates space between your other Components/Elements. Use the size Prop to specify the size of the space, based on the theme size variables. This comes with responsive breakpoints. This can be used as a wrapper which will act as padding around the wrapped children.
Installation
yarn add @berlitz/spacer
Props
Argument | Type | Required | Default | Example |
---|---|---|---|---|
top | bool | false | ||
bottom | bool | false | ||
left | bool | false | ||
right | bool | false | ||
noTop | bool | false | ||
noBottom | bool | false | ||
noLeft | bool | false | ||
noRight | bool | false | ||
size | string | "md" | "xs" (refer to theme variables theme.spacesize) | |
breakpoints | object | {} | breakpoints={{md: 'lg', lg: 'xxl',}} |
Usage
import React from 'react'
import Spacer from '@berlitz/spacer'
const MyApp = () =>
<App>
<Hero>
<Section>
<H1>Boo!</H1>
<LeadText> Hello Friend 👻</LeadText>
<Spacer size="xl"/>
<Content>Some Paragraph</Content>
<Spacer
noBottom
size="xl"
breakpoints={{
lg: 'md',
xl: 'xxl',
}}
>
<Image/>
</Spacer>
<ThreeCatPillars/>
</Section>
<Footer/>
</App>
When to use this component
- Rather than extending components just for space, this component comes very handy.
- Quickly Add space anywhere necessary
2.0.10-test.25
3 years ago
2.0.9
4 years ago
2.0.8
4 years ago
2.0.7
4 years ago
2.0.6
4 years ago
2.0.1-alpha.63
4 years ago
2.0.5
4 years ago
2.0.3
4 years ago
2.0.4
4 years ago
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.4.1
6 years ago
1.4.0
6 years ago
1.3.2
6 years ago
1.3.1
6 years ago
1.3.0
6 years ago
1.2.6
6 years ago
1.2.5
6 years ago
1.2.4
6 years ago
1.2.3
6 years ago
1.2.2
6 years ago
1.2.1
6 years ago
1.2.0
6 years ago
1.1.0
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago