UNPKG

koval-ui

Version:

React components collection with minimalistic design. Supports theming, layout, and input validation.

54 lines (53 loc) 1.32 kB
"use client"; import { jsxs as r, jsx as s } from "react/jsx-runtime"; import { useMemo as m } from "react"; import { IconClose as a } from "../../../internal/Icons/IconClose.js"; import { IconDelete as c } from "../../../internal/Icons/IconDelete.js"; import n from "./Dialog.module.css.js"; import { useDialogState as p } from "../../Dialog/useDialogState.js"; import { Dialog as f } from "../../Dialog/Dialog.js"; import { NumberDecimal as u } from "../../Number/NumberDecimal.js"; const j = ({ selectionAmount: l, onDeleteConfirmation: e, id: t }) => { const { closeDialog: o } = p(t), i = m( () => [ [ { title: "Cancel", type: "default", icon: a, onClick: () => { o(); } }, { title: "Delete", type: "danger", icon: c, onClick: () => { e(), o(); } } ] ], [o, e] ); return /* @__PURE__ */ r( f, { animation: "scale-in", id: t, className: n.deleteDialog, actions: i, showCloseButton: !1, children: [ "Do you want to delete ", /* @__PURE__ */ s(u, { value: l }), " row(s)?" ] } ); }; export { j as DeleteDialog }; //# sourceMappingURL=DeleteDialog.js.map