UNPKG

laif-ds

Version:

Design System di Laif con componenti React basati su principi di Atomic Design

40 lines (39 loc) 1.91 kB
"use client"; import { jsxs as i, jsx as r } from "react/jsx-runtime"; import { useLexicalComposerContext as l } from "../../../../node_modules/@lexical/react/LexicalComposerContext.prod.js"; import { CLEAR_EDITOR_COMMAND as n } from "../../../../node_modules/lexical/Lexical.prod.js"; import { Button as e } from "../../../ui/button.js"; import { Dialog as a, DialogTrigger as d, DialogContent as c, DialogHeader as s, DialogTitle as h, DialogDescription as m, DialogFooter as C, DialogClose as o } from "../../../ui/dialog.js"; import { Tooltip as u, TooltipTrigger as p, TooltipContent as g } from "../../../ui/tooltip.js"; import D from "../../../../node_modules/lucide-react/dist/esm/icons/trash-2.js"; function N() { const [t] = l(); return /* @__PURE__ */ i(a, { children: [ /* @__PURE__ */ i(u, { disableHoverableContent: !0, children: [ /* @__PURE__ */ r(p, { asChild: !0, children: /* @__PURE__ */ r(d, { asChild: !0, children: /* @__PURE__ */ r(e, { size: "sm", variant: "ghost", className: "p-2", children: /* @__PURE__ */ r(D, { className: "h-4 w-4" }) }) }) }), /* @__PURE__ */ r(g, { children: "Clear Editor" }) ] }), /* @__PURE__ */ i(c, { children: [ /* @__PURE__ */ i(s, { children: [ /* @__PURE__ */ r(h, { children: "Clear Editor" }), /* @__PURE__ */ r(m, { children: "Are you sure you want to clear the editor?" }) ] }), /* @__PURE__ */ i(C, { children: [ /* @__PURE__ */ r(o, { asChild: !0, children: /* @__PURE__ */ r(e, { variant: "outline", children: "Cancel" }) }), /* @__PURE__ */ r(o, { asChild: !0, children: /* @__PURE__ */ r( e, { variant: "destructive", onClick: () => { t.dispatchCommand(n, void 0); }, children: "Clear" } ) }) ] }) ] }) ] }); } export { N as ClearEditorActionPlugin };