UNPKG

@cgi-learning-hub/ui

Version:

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

45 lines (44 loc) 1.65 kB
import { jsx as B } from "react/jsx-runtime"; import { s as c } from "../../DefaultPropsProvider-BrmlvPWg.js"; import { B as x } from "../../Button-C1mKNW-c.js"; const T = c(x)(({ color: a, theme: s }) => { var m, d, f, b, e, p; const n = (f = (d = (m = s.components) == null ? void 0 : m.MuiButton) == null ? void 0 : d.variants) == null ? void 0 : f.find( (u) => { var t; return ((t = u.props) == null ? void 0 : t.variant) === "outlined"; } ), i = (p = (e = (b = s.components) == null ? void 0 : b.MuiButton) == null ? void 0 : e.variants) == null ? void 0 : p.find( (u) => { var t; return ((t = u.props) == null ? void 0 : t.variant) === "contained"; } ), r = n == null ? void 0 : n.style, o = i == null ? void 0 : i.style; return { minHeight: 38, textTransform: "none", transition: "all 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms", "&.MuiButton-outlined": { ...r ?? {}, borderRadius: (r == null ? void 0 : r.borderRadius) ?? 5, borderWidth: (r == null ? void 0 : r.borderWidth) ?? 2, textTransform: (r == null ? void 0 : r.textTransform) ?? "none" /* "&:hover": { //backgroundColor: theme.palette[color].main, color: theme.palette.common.white, },*/ }, "&.MuiButton-contained": { ...o ?? {}, borderRadius: (o == null ? void 0 : o.borderRadius) ?? 5, borderWidth: (o == null ? void 0 : o.borderWidth) ?? 2, textTransform: (o == null ? void 0 : o.textTransform) ?? "none" } }; }), R = ({ variant: a = "outlined", ...s }) => /* @__PURE__ */ B(T, { variant: a, ...s }); export { R as default };