UNPKG

fui-fancyui

Version:
51 lines (50 loc) 1.13 kB
import { uiColors as r, updateThemeColors as t } from "../generateThemeColor/generateThemeColor.js"; import { typography as h, spacingPx as i, borderRadius as a } from "../designSizes.js"; import { breakpoints as p } from "../brakePoints.js"; import { globalElementSizes as c } from "../globalSizes.js"; import { create as l } from "../../../../node_modules/zustand/esm/react.js"; const T = l((o) => ({ theme: { color: r, borderRadius: a, spacing: i, fontSizes: h, breakpoints: p, globalElementSizes: c, outlined: { outlinedBackgroundStrength: 0.5 } }, isDarkTheme: !0, switchTheme: () => { o((e) => ({ isDarkTheme: !e.isDarkTheme, theme: { ...e.theme, color: { ...e.theme.color, primary: e.theme.color.secondary, secondary: e.theme.color.primary } } })); }, updateTheme: (e) => { t(e), o((m) => ({ theme: { ...m.theme, colors: r } })); }, setTheme: (e) => { o(() => ({ theme: { ...e } })); } })); export { T as default };