UNPKG

@hitachivantara/uikit-react-lab

Version:

Contributed React components for the NEXT UI Kit.

35 lines (34 loc) 943 B
import { theme } from "@hitachivantara/uikit-styles"; const getColor = (state) => ({ Pending: theme.colors.warning ?? "warning", Failed: theme.colors.negative ?? "negative", Completed: theme.colors.positive ?? "positive", Current: theme.colors.text ?? "text", Disabled: theme.colors.textDisabled ?? "textDisabled", Enabled: theme.colors.text ?? "text" })[state]; const getSemantic = (state) => ({ Pending: "warning", Failed: "negative", Completed: "positive", Current: "text", Disabled: "textDisabled", Enabled: "text" })[state]; const EXTRA_SMALL = { container: 32, avatar: 24 }; const SMALL = { container: 40, avatar: 32 }; const MEDIUM = { container: 48, avatar: 40 }; const LARGE = { container: 60, avatar: 52 }; const EXTRA_LARGE = { container: 96, avatar: 88 }; const stepSizes = { xs: EXTRA_SMALL, sm: SMALL, md: MEDIUM, lg: LARGE, xl: EXTRA_LARGE }; export { getColor, getSemantic, stepSizes };