@amendable/expand-style-shorthands

0.1.0 • Public • Published

Expand style shorthands

This expands style shorthand syntax (padding: 1) into long-hand syntax (paddingTop: 1, paddingRight: 1, paddingBottom: 1, paddingLeft: 1).

Usage

import { render } from 'react-dom'
import Box, { AmendableProvider } from '@amendable/core'
import expandStyleShorthands from '@amendable/expand-style-shorthands'
import inlineStyles from '@amendable/inline-styles'

render(
  <AmendableProvider
    resolvers={[
      expandStyleShorthands(),
      inlineStyles()
    ]}
  >
    <Box padding='10px' backgroundColor='black' color='white'>
      Padding is expanded on the DOM node
    </Box>
  </AmendableProvider>
)

Supported props

It supports all the props that inline-style-expand-shorthand supports.

Readme

Keywords

none

Package Sidebar

Install

npm i @amendable/expand-style-shorthands

Weekly Downloads

3

Version

0.1.0

License

MIT

Unpacked Size

16.4 kB

Total Files

8

Last publish

Collaborators

  • jpalumickas
  • nedomas
  • saimis