Skip to content

amendable/scale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c8a3561 · Dec 12, 2019

History

12 Commits
Oct 3, 2019
May 8, 2019
Dec 12, 2019
May 8, 2019
Oct 3, 2019
Oct 3, 2019

Repository files navigation

Scale

This resolver allows implementing step-based design systems. It scales every size prop (width, padding, margin, etc.) by the base number and allows to use a custom calculation if needed.

Usage

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

render(
  <AmendableProvider
    resolvers={[
      scale({
        base: 16,
      }),
      inlineStyles(),
    ]}
  >
    <Box padding={2} color='white' backgroundColor='black'>
      Primary color
    </Box>
  </AmendableProvider>
)

Supported props

Here's a list of supported props.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published