UNPKG

@porsche-design-system/components-react

Version:

Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.

26 lines (22 loc) 1.31 kB
'use strict'; var jsxRuntime = require('react/jsx-runtime'); var splitChildren = require('../../splitChildren.cjs'); var react = require('react'); var minifyCss = require('../../minifyCss.cjs'); var stylesEntry = require('../../../../../../components/dist/styles/esm/styles-entry.cjs'); var utilsEntry = require('../../../../../../components/dist/utils/esm/utils-entry.cjs'); /** * @slot {"name": "", "description": "Default slot for the display text." } * * @deprecated since v4.0.0, will be removed with next major release. Please use `p-heading` instead. */ class DSRDisplay extends react.Component { host; render() { splitChildren.splitChildren(this.props.children); const TagType = utilsEntry.getDisplayTagType(null, this.props.size, this.props.tag); const style = minifyCss.minifyCss(stylesEntry.getDisplayCss(this.props.size, this.props.align, this.props.color, this.props.ellipsis)); return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(TagType, { className: "root", children: jsxRuntime.jsx("slot", {}) })] }), this.props.children] })); } } exports.DSRDisplay = DSRDisplay;