UNPKG

@cgi-learning-hub/ui

Version:

@cgi-learning-hub/ui is an open-source React component library that implements UI for HUB's features

30 lines (29 loc) 947 B
import { styled as l, ToggleButtonGroup as a, ToggleButton as n } from "@mui/material"; const c = l(a, { shouldForwardProp: (o) => o !== "colorvariant" })(({ theme: o, colorvariant: r }) => ({ borderColor: r === "primary" ? o.palette.primary.light : o.palette.secondary.light })), i = l(n, { shouldForwardProp: (o) => o !== "colorvariant" })(({ theme: o, colorvariant: r }) => { const t = r === "primary" ? o.palette.primary.main : o.palette.secondary.main, e = r === "primary" ? o.palette.primary.light : o.palette.secondary.light; return { color: o.palette.text.secondary, "&.Mui-selected": { backgroundColor: t, color: o.palette.common.white }, "&:hover": { backgroundColor: e, color: o.palette.text.secondary }, "&.Mui-selected:hover": { backgroundColor: t, color: o.palette.common.white } }; }); export { i as StyledToggleButton, c as StyledToggleButtonGroup };