@cgi-learning-hub/ui
Version:
@cgi-learning-hub/ui is an open-source React component library that implements UI for HUB's features
95 lines (94 loc) • 2.61 kB
JavaScript
import { jsx as a, jsxs as p } from "react/jsx-runtime";
import { u } from "./useTheme-0AkY41zn.js";
import { A as f } from "./Alert-CEu3llDi.js";
import * as T from "react";
import { P as t } from "./index-B9vkf41S.js";
import { F as g, G as y, H as A, n as d } from "./generateUtilityClasses-B_xKAflz.js";
import { m as h } from "./memoTheme-C-PaH-Cy.js";
import { u as x, s as b, c as C } from "./DefaultPropsProvider-BrmlvPWg.js";
import { T as j } from "./Typography-Cr-aIusw.js";
function M(e) {
return y("MuiAlertTitle", e);
}
const B = g("MuiAlertTitle", ["root"]), N = (e) => {
const {
classes: s
} = e;
return C({
root: ["root"]
}, M, s);
}, O = b(j, {
name: "MuiAlertTitle",
slot: "Root"
})(h(({
theme: e
}) => ({
fontWeight: e.typography.fontWeightMedium,
marginTop: -2
}))), n = /* @__PURE__ */ T.forwardRef(function(s, o) {
const r = x({
props: s,
name: "MuiAlertTitle"
}), {
className: i,
...c
} = r, l = r, m = N(l);
return /* @__PURE__ */ a(O, {
gutterBottom: !0,
component: "div",
ownerState: l,
ref: o,
className: A(m.root, i),
...c
});
});
process.env.NODE_ENV !== "production" && (n.propTypes = {
// ┌────────────────────────────── Warning ──────────────────────────────┐
// │ These PropTypes are generated from the TypeScript type definitions. │
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
// └─────────────────────────────────────────────────────────────────────┘
/**
* The content of the component.
*/
children: t.node,
/**
* Override or extend the styles applied to the component.
*/
classes: t.object,
/**
* @ignore
*/
className: t.string,
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
});
const F = ({
severity: e = "success",
...s
}) => {
const o = u();
return /* @__PURE__ */ p(
f,
{
severity: e,
color: e,
sx: {
bgcolor: d(o.palette[e].light, 0.35),
...s.sx
},
...s,
children: [
s.title ? /* @__PURE__ */ a(n, { children: s.title }) : null,
s.children
]
}
);
};
export {
n as A,
B as a,
F as b,
M as g
};