0.0.3 • Published 5 years ago

@altairtv/nymeia v0.0.3

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

@altair/nymeia

This repository contains values for color, spacing, typography, and other primitives for use with Twelve, Altair's design system.

Usage

Nymeia's primitives are exported as keys on the top-level export. colors, spacing, and typography are available:

import { colors, spacing, typography } from '@altair/nymeia'

Additionally, a theme is exported, which is a great way of sharing system styles with Emotion. Pass the theme preset to Emotion's ThemeProvider component at the root of your application.

import React from 'react'
import { ThemeProvider } from 'emotion-theming'
import { theme } from '@altair/nymeia'

export default props =>
  <ThemeProvider theme={theme}>
    {props.children}
  </ThemeProvider>

For use with Theme UI, import the ThemeProvider from theme-ui instead.

import { ThemeProvider } from 'theme-ui'

Customizing

The base theme object can be customized by using either deepmerge or lodash.merge to deeply merge objects.

import merge from 'lodash.merge'
import { nymeia } from '@altair/nymeia'

export default merge(nymeia, {
  colors: {
    // custom primary color
    primary: 'avocado',
  }
})

License

MIT © Altair

0.0.3

5 years ago