@theme-ui/custom-properties
v0.17.1
Published
Generate CSS custom properties for use with Theme UI
Downloads
2,368
Readme
@theme-ui/custom-properties
Generate CSS custom properties for use with Theme UI.
https://theme-ui.com
Installation
npm i @theme-ui/custom-properties
Usage
Transform your Theme UI compliant theme config with the library:
const toCustomProperties = require('@theme-ui/custom-properties')
const theme = require('../theme')
module.exports = () => {
const customProperties = toCustomProperties(theme, '🍭')
return customProperties
}
Parameters
The @theme-ui/custom-properties function takes two parameters:
toCustomProperties($theme, $prefix)
- theme - The theme ui specification object
- prefix - An optional prefix for the css custom property optional