@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.
11 lines (7 loc) • 796 B
JavaScript
;
var jsxRuntime = require('react/jsx-runtime');
const NotificationBase = ({ heading, headingTag, hasHeadingSlot, description, hasDescriptionSlot, innerHTML, actionLabel, dismissButton, ...rest }) => {
const Heading = headingTag;
return (jsxRuntime.jsxs("div", { className: "notification", ...rest, children: [heading ? jsxRuntime.jsx(Heading, { children: heading }) : hasHeadingSlot && jsxRuntime.jsx("slot", { name: "heading" }), description ? (innerHTML ? (jsxRuntime.jsx("p", { dangerouslySetInnerHTML: { __html: description } })) : (jsxRuntime.jsx("p", { children: description }))) : hasDescriptionSlot ? (jsxRuntime.jsx("slot", { name: "description" })) : (jsxRuntime.jsx("slot", {})), actionLabel, dismissButton] }));
};
exports.NotificationBase = NotificationBase;