0.0.3 • Published 5 years ago
@amendable/spacing-aliases v0.0.3
Spacing aliases
This allows you to use shorthand aliases for spacing props (marginX
, py
, paddingY
, etc.).
Usage
import { render } from 'react-dom'
import Box, { AmendableProvider } from '@amendable/core'
import spacingAliases from '@amendable/spacing-aliases'
import inlineStyles from '@amendable/inline-styles'
render(
<AmendableProvider
resolvers={[
spacingAliases(),
inlineStyles()
]}
>
<Box paddingX='20px' paddingY='10px' color='white' backgroundColor='black'>
Padded box
</Box>
</AmendableProvider>
)
Supported props
It supports longer forms as described here.
The shorter form syntax thats supported is here.