curls
Version:
💪 Responsive, expressive UI primitives for React written with Style Hooks and Emotion
9 lines (8 loc) • 300 B
JavaScript
import {css} from '@emotion/core'
import memoize from 'trie-memoize'
const colorize = memoize([WeakMap, Map, Map], (theme, property, color) =>
/*#__PURE__*/
css(property, ':', theme.colors[color] || color, ';')
)
export default (p, c, t) =>
c === false || c === null ? null : colorize(t, p, c)