UNPKG

@kuma-ui/core

Version:

🐻 Kuma UI is a utility-first, zero-runtime CSS-in-JS library that offers an outstanding developer experience and optimized performance.

21 lines (20 loc) 401 B
// src/theme.ts import { flattenObject } from "./utils/object.mjs"; function createTheme(theme) { const rawTheme = theme; const resolvedTokens = {}; for (const key in rawTheme) { if (key !== "components") { resolvedTokens[key] = flattenObject({ [key]: rawTheme[key] }); } } return { ...resolvedTokens, components: rawTheme.components }; } export { createTheme };