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.

9 lines (6 loc) 688 B
import { jsxs, jsx } from 'react/jsx-runtime'; const NotificationBase = ({ heading, headingTag, hasHeadingSlot, description, hasDescriptionSlot, innerHTML, actionLabel, dismissButton, ...rest }) => { const Heading = headingTag; return (jsxs("div", { className: "notification", ...rest, children: [heading ? jsx(Heading, { children: heading }) : hasHeadingSlot && jsx("slot", { name: "heading" }), description ? (innerHTML ? (jsx("p", { dangerouslySetInnerHTML: { __html: description } })) : (jsx("p", { children: description }))) : hasDescriptionSlot ? (jsx("slot", { name: "description" })) : (jsx("slot", {})), actionLabel, dismissButton] })); }; export { NotificationBase };