UNPKG

@veracity/vui

Version:

Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.

95 lines (93 loc) 1.4 kB
import { switchColors } from "./consts.js"; //#region src/switch/theme.ts const baseStyle = { button: { thumb: { bg: "white" }, track: { ring: 3 } } }; function sizeXl() { return { button: { fontSize: "lg", minW: 58, thumb: { h: 28, w: 28 }, track: { h: 32 } }, label: { size: "xl" } }; } function sizeLg() { return { button: { fontSize: "md", minW: 50, thumb: { h: 24, w: 24 }, track: { h: 28 } }, label: { size: "lg" } }; } function sizeMd() { return { button: { fontSize: "sm", minW: 42, thumb: { h: 20, w: 20 }, track: { h: 24 } }, label: { size: "md" } }; } function sizeSm() { return { button: { fontSize: "xs", minW: 34, thumb: { h: 16, w: 16 }, track: { h: 20 } }, label: { size: "sm" } }; } const defaultProps = { size: "md", variant: "primary" }; const parts = [ "container", "button", "label" ]; const sizes = { sm: sizeSm, md: sizeMd, lg: sizeLg, xl: sizeXl }; const variants = { primary: { button: { track: { bg: switchColors.main } } }, green: { button: { track: { bg: switchColors.green } } }, red: { button: { track: { bg: switchColors.red } } } }; var theme_default = { baseStyle, defaultProps, parts, sizes, variants }; //#endregion export { theme_default as default }; globalThis.__vuiVersion__ = "5.3.1" //# sourceMappingURL=theme.js.map