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.

22 lines (19 loc) 1.14 kB
import { jsxs, Fragment, jsx } from 'react/jsx-runtime'; import { splitChildren } from '../../splitChildren.mjs'; import { Component } from 'react'; import { minifyCss } from '../../minifyCss.mjs'; import { stripFocusAndHoverStyles } from '../../stripFocusAndHoverStyles.mjs'; import { getFlexCss as getComponentCss$V } from '../../../../../../components/dist/styles/esm/styles-entry.mjs'; /** * @slot {"name": "", "description": "Default slot for the flex items." } * @deprecated since v3.0.0, will be removed with next major release. Use native CSS Flex instead. */ class DSRFlex extends Component { host; render() { splitChildren(this.props.children); const style = minifyCss(stripFocusAndHoverStyles(getComponentCss$V(this.props.inline, this.props.wrap, this.props.direction, this.props.justifyContent, this.props.alignItems, this.props.alignContent))); return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx("slot", {})] }), this.props.children] })); } } export { DSRFlex };