UNPKG

@hitachivantara/uikit-react-core

Version:
45 lines (44 loc) 1.39 kB
import { theme } from "@hitachivantara/uikit-styles"; import { createClasses } from "@hitachivantara/uikit-react-utils"; var { staticClasses, useClasses } = createClasses("HvStatusIcon", { root: { display: "inline-flex", lineHeight: 0, flexShrink: 0, borderRadius: theme.radii.base, "--icsize": "auto", ":where([data-size=md])": { borderRadius: theme.radii.round }, ":where([data-size=lg])": { borderRadius: theme.radii.large }, ":where([data-size=xl])": { borderRadius: theme.radii.large }, ":where([data-type=full])": { outline: "1px solid currentcolor", padding: theme.space.xxs }, ...Object.fromEntries(Object.entries({ success: "positive", warning: "warning", error: "negative", default: "info", info: "info", accent: "accent" }).map(([variant, color]) => [[`:where([data-variant=${variant}])`], { color: theme.colors[color], outline: `1px solid ${theme.colors[`${color}Border`]}`, backgroundColor: theme.colors[`${color}Dimmed`], ":where([data-type=simple])": { outline: "none", backgroundColor: "transparent" } }])), ":where([data-variant=default])": { color: theme.colors.text, ":where([data-type=full])": { backgroundColor: theme.colors.bgPage, outline: `1px solid ${theme.colors.borderSubtle}` } } }, icon: { fontSize: "inherit" } }); //#endregion export { staticClasses, useClasses };