UNPKG

@fluido/react-components

Version:
18 lines (17 loc) 844 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const jsx_runtime_1 = require("react/jsx-runtime"); const button_1 = __importDefault(require("../../button")); const DialogActions = ({ actions, onClose, }) => { const entries = Object.entries(actions || {}); return (jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: entries.map((entry) => (jsx_runtime_1.jsx(button_1.default, Object.assign({ kind: 'text', onClick: () => { if (entry[1]) entry[1](); if (onClose) onClose(); } }, { children: entry[0] }), entry[0]))) }, void 0)); }; exports.default = DialogActions;