UNPKG

@wazespace/wme-react-components

Version:

A package with useful replications of the Waze Map Editor components to use in userscripts

8 lines 758 B
import { jsx as _jsx } from "react/jsx-runtime"; import { Waze } from '../wz-intrinsic-element-components'; import { pickProps } from '../utils/object-extraction'; export function WzAlert(props) { const directAlertProps = pickProps(props, ['variant', 'level', 'multiline']); return (_jsx(Waze.IntrinsicElements.WzAlert, { ...directAlertProps, slotIcon: props.customIcon, slotDismiss: props.dismissText ? _jsx("span", { children: props.dismissText }) : undefined, slotAction: props.actionText ? _jsx("span", { children: props.actionText }) : undefined, onAlertDismissed: props.onDismiss, onActionClicked: props.onAction, children: _jsx("div", { className: "sidebar-alert-content", children: props.children }) })); } //# sourceMappingURL=WzAlert.js.map