@cerberus-design/react
Version:
The Cerberus Design React component library.
41 lines (40 loc) • 666 B
JavaScript
// src/components/text/text.tsx
import {
Em,
H1,
H2,
H3,
H4,
H5,
H6,
P,
Small,
Span,
Strong
} from "styled-system/jsx";
import { jsx } from "react/jsx-runtime";
function Text(props) {
const { as = "p", ...pandaJSXProps } = props;
const cache = {
h1: H1,
h2: H2,
h3: H3,
h4: H4,
h5: H5,
h6: H6,
strong: Strong,
em: Em,
small: Small,
span: Span,
p: P
};
if (as in cache) {
const Component = cache[as];
return /* @__PURE__ */ jsx(Component, { ...pandaJSXProps });
}
return /* @__PURE__ */ jsx(P, { ...pandaJSXProps });
}
export {
Text
};
//# sourceMappingURL=chunk-VPD3PPBW.js.map