UNPKG

uinix-theme

Version:

Fully configurable framework-agnostic theme system (spec, theme, renderer, themed styles/keyframes/CSS variables) for building UIs. Your theme your rules 🤘.

13 lines (10 loc) • 286 B
/** * @typedef {import('../types.js').Style} Style */ import {isPlainObject, k} from 'uinix-fp'; /** * Coerces a style (object or rule) to a rule * @param {Style} style * @returns {*} StyleRule */ export const toStyleRule = (style) => (isPlainObject(style) ? k(style) : style);