UNPKG

@gravity-ui/uikit

Version:

Gravity UI base styling and components

15 lines (14 loc) 830 B
'use client'; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AlertActions = void 0; const jsx_runtime_1 = require("react/jsx-runtime"); const AlertAction_1 = require("./AlertAction.js"); const constants_1 = require("./constants.js"); const useAlertContext_1 = require("./useAlertContext.js"); const AlertActions = ({ items, children, className }) => { const { actionsLayout } = (0, useAlertContext_1.useAlertContext)(); return ((0, jsx_runtime_1.jsx)("div", { className: (0, constants_1.bAlert)('actions', { [actionsLayout]: true }, className), children: items?.map(({ handler, text }, i) => ((0, jsx_runtime_1.jsx)(AlertAction_1.AlertAction, { onClick: handler, children: text }, i))) || children })); }; exports.AlertActions = AlertActions; //# sourceMappingURL=AlertActions.js.map