koval-ui
Version:
React components collection with minimalistic design. Supports theming, layout, and input validation.
51 lines (50 loc) • 1.07 kB
JavaScript
"use client";
import { jsx as r } from "react/jsx-runtime";
import { Variants as n } from "../../internal/Actions/Variants.js";
import { Actions as c } from "../../internal/Actions/Actions.js";
import { Variants as t } from "./Variants.js";
import { Menu as p } from "./Menu.js";
import a from "./Menu.module.css.js";
const l = [
"bottom",
"top",
"bottom-end",
"bottom-start",
"top-start",
"top-end"
], A = ({
children: s,
/** Provide an array of actions with callbacks */
actions: e = [],
/** Set design of Menu */
variant: o = t.bordered,
...i
}) => {
const m = {
[t.plain]: n.inverted,
[t.bordered]: n.primary
}[o];
return /* @__PURE__ */ r(
p,
{
...i,
allowedPlacements: l,
variant: o,
content: /* @__PURE__ */ r(
c,
{
variant: m,
actions: e,
classNameRow: a.row,
classNameAction: a.actionButton
}
),
alignWidth: !1,
children: s
}
);
};
export {
A as MenuActions
};
//# sourceMappingURL=MenuActions.js.map