UNPKG

@gravity-ui/uikit

Version:

Gravity UI base styling and components

11 lines (10 loc) 587 B
'use client'; import { jsx as _jsx } from "react/jsx-runtime"; import { AlertAction } from "./AlertAction.js"; import { bAlert } from "./constants.js"; import { useAlertContext } from "./useAlertContext.js"; export const AlertActions = ({ items, children, className }) => { const { actionsLayout } = useAlertContext(); return (_jsx("div", { className: bAlert('actions', { [actionsLayout]: true }, className), children: items?.map(({ handler, text }, i) => (_jsx(AlertAction, { onClick: handler, children: text }, i))) || children })); }; //# sourceMappingURL=AlertActions.js.map