UNPKG

koval-ui

Version:

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

73 lines (72 loc) 2.02 kB
"use client"; import { jsxs as o, jsx as e } from "react/jsx-runtime"; /* empty css */ import { IconEdit as p } from "../../internal/Icons/IconEdit.js"; import { IconDelete as f } from "../../internal/Icons/IconDelete.js"; import { IconClear as v } from "../../internal/Icons/IconClear.js"; import r from "./DataTable.module.css.js"; import { Button as t } from "../Button/Button.js"; import { Strong as n } from "../Text/InlineElements.js"; import { NumberDecimal as a } from "../Number/NumberDecimal.js"; const k = ({ onClear: c, selectedRows: l, onDeleteRequest: s, onEditRequest: m, totalRows: d }) => { const i = l === 0; return /* @__PURE__ */ o("div", { className: r.rowSelection, children: [ /* @__PURE__ */ o("div", { className: r.rowSelectionActions, children: [ /* @__PURE__ */ e( t, { className: r.rowSelectionButton, prefix: v, size: "small", variant: "alternative", onClick: c, disabled: i, children: "Clear selection" } ), /* @__PURE__ */ e( t, { className: r.rowSelectionButton, onClick: s, size: "small", variant: "alternative", prefix: f, disabled: i, children: "Delete row(s)" } ), /* @__PURE__ */ e( t, { className: r.rowSelectionButton, onClick: m, size: "small", variant: "alternative", prefix: p, disabled: i, children: "Edit row(s)" } ) ] }), /* @__PURE__ */ o("div", { className: r.rowSelectionText, children: [ /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(a, { value: l }) }), " ", "of", " ", /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(a, { value: d }) }), " ", "rows selected" ] }) ] }); }; export { k as SelectableActions }; //# sourceMappingURL=SelectableActions.js.map