1.0.0-0 • Published 6 years ago

thema v1.0.0-0

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

thema

Schema validation for design system theme objects. Intended for use with styled-system

npm i thema
import { isValid } from 'thema'
import theme from './theme'

isValid(theme)
// returns true for valid theme objects

Schema

This schema is based on the theme structure used in styled-system, but can be used for other purposes as well, where a standardize theme shape can help with interoperability.

// TK
Theme {
  space: NumberOrStringArray,
  fontSizes: NumberOrStringArray,
  colors: Object,
}
1.0.0-0

6 years ago

0.0.1

8 years ago