1.0.0-0 • Published 6 years ago
thema v1.0.0-0
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,
}