2.0.9 • Published 2 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
2 years ago
2.0.9
3 years ago
2.0.8
3 years ago
2.0.7
3 years ago
2.0.6
3 years ago
2.0.1-alpha.63
3 years ago
2.0.5
3 years ago
2.0.3
3 years ago
2.0.4
3 years ago
2.0.2
3 years ago
2.0.1
3 years ago
2.0.0
4 years ago
1.4.1
4 years ago
1.4.0
4 years ago
1.3.2
5 years ago
1.3.1
5 years ago
1.3.0
5 years ago
1.2.6
5 years ago
1.2.5
5 years ago
1.2.4
5 years ago
1.2.3
5 years ago
1.2.2
5 years ago
1.2.1
5 years ago
1.2.0
5 years ago
1.1.0
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago