UNPKG

@cerberus-design/react

Version:

The Cerberus Design React component library.

31 lines (26 loc) 815 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); const jsxRuntime = require('react/jsx-runtime'); const index = require('../../system/index.cjs'); function Text(props) { const { as = "p", ...elProps } = props; const cache = { h1: index.cerberus.h1, h2: index.cerberus.h2, h3: index.cerberus.h3, h4: index.cerberus.h4, h5: index.cerberus.h5, h6: index.cerberus.h6, strong: index.cerberus.strong, em: index.cerberus.em, small: index.cerberus.small, span: index.cerberus.span, p: index.cerberus.p }; if (as in cache) { const Component = cache[as]; return /* @__PURE__ */ jsxRuntime.jsx(Component, { ...elProps }); } return /* @__PURE__ */ jsxRuntime.jsx(index.cerberus.p, { ...elProps }); } exports.Text = Text;