2.1.1 • Published 5 years ago

@beatgig/synth-tokens v2.1.1

Weekly downloads
9
License
MIT
Repository
-
Last release
5 years ago

@beatgig/synth-tokens

Default token declarations used for building UI components at BeatGig.

Installation

yarn add @beatgig/synth-tokens

Usage

import React from 'react'
import styled from 'styled-components'
import ReactDOM from 'react-dom'
import { backgroundColor, color } from '@beatgig/synth-styled-components'
import { SynthProvider } from '@beatgig/synth-react'
import { tokens } from '@beatgig/synth-tokens'
import { withTokens } from '@beatgig/synth-css'

const customTokens = {
  ...tokens,

  color: {
    text: {
      customButton: 'white',
    },

    background: {
      customButton: 'red',
    },
  },
}

const CustomButton = styled.button`
  ${backgroundColor('customButton')}
  ${color('customButton')}
`

ReactDOM.render(
  <SynthProvider value={{
    tokens: customTokens,
    ...withTokens(customTokens),
  }}>
    <CustomButton>A Custom Button<CustomButton>
  </SynthProvider>,
  document.getElementById('root')
)
2.1.1

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago