UNPKG

reactjs-tiptap-editor

Version:

A modern WYSIWYG rich text editor based on tiptap and shadcn ui for React

55 lines (54 loc) 1.47 kB
import { B as d } from "./index-Do_dsOGB.js"; import { jsx as c, Fragment as m } from "react/jsx-runtime"; import { u as f, d as v, A } from "./index-RcSPeQHn.js"; import "react"; import "./theme.js"; function y() { const t = f(B.name), { icon: o = void 0, tooltip: i = void 0, shortcutKeys: s = void 0, tooltipOptions: r = {}, action: e = void 0, isActive: l = void 0 } = (t == null ? void 0 : t.componentProps) ?? {}, { dataState: u, disabled: n, update: a } = v(l), p = () => { n || e && (e(), a()); }; return t ? /* @__PURE__ */ c( A, { action: p, dataState: u, disabled: n, icon: o, shortcutKeys: s, tooltip: i, tooltipOptions: r } ) : /* @__PURE__ */ c(m, {}); } const B = /* @__PURE__ */ d.extend({ // eslint-disable-next-line @typescript-eslint/ban-ts-comment //@ts-expect-error addOptions() { var t; return { ...(t = this.parent) == null ? void 0 : t.call(this), button: ({ editor: o, t: i, extension: s }) => ({ // component: ActionButton, componentProps: { action: () => o.commands.toggleBulletList(), isActive: () => o.isActive("bulletList"), disabled: !1, shortcutKeys: s.options.shortcutKeys ?? ["shift", "mod", "8"], icon: "List", tooltip: i("editor.bulletlist.tooltip") } }) }; } }); export { B as BulletList, y as RichTextBulletList };