UNPKG

@beamwind/preset-semantic

Version:

beamwind design system preset using a semantic naming scheme

27 lines (26 loc) 650 B
// src/index.ts import {createColorVariants} from "@beamwind/colors"; var isBaseColor = (key) => key.indexOf("-") === -1; function preset({colors: colors2} = {}) { const base = { surface: "#fafafa", "on-surface": "#222", primary: "#0d3880", secondary: "#e60278", caution: "#ffc600", critical: "#d0011b", info: "#1e468c", neutral: "#596581", positive: "#138a08", promote: "#9556b7", ...colors2 }; return { theme: { colors: Object.keys(base).filter(isBaseColor).reduce((colors3, key) => ({...colors3, ...createColorVariants(colors3, key)}), base) } }; } export { preset as default };