@amendable/colors

0.3.0 • Public • Published

Colors

Colors converter is helpful when you want to define app-wide color theme and reuse them easily.

Usage

import { render } from 'react-dom'
import Box, { AmendableProvider } from '@amendable/core'
import colors from '@amendable/colors'
import inlineStyles from '@amendable/inline-styles'

render(
  <AmendableProvider
    resolvers={[
      colors({ colors: { primary: '#0055ff', red: '#F5BCCF' } }),
      inlineStyles(),
    ]}
  >
    <Box color='primary' backgroundColor='red'>
      Primary color
    </Box>
  </AmendableProvider>
)

Note

You can both create your own color names or redefine existing CSS colors (like red, blue, etc.)

Supported props

color
backgroundColor
borderColor
// ...and anything else that matches /color/i

Readme

Keywords

none

Package Sidebar

Install

npm i @amendable/colors

Weekly Downloads

2

Version

0.3.0

License

MIT

Unpacked Size

7.99 kB

Total Files

8

Last publish

Collaborators

  • jpalumickas
  • nedomas
  • saimis