UNPKG

md-editor-rt

Version:

Markdown editor for react, developed in jsx and typescript, dark theme、beautify content by prettier、render articles directly、paste or clip the picture and upload it...

32 lines (31 loc) 851 B
import { jsx as t } from "react/jsx-runtime"; import { useContext as a, useMemo as d } from "react"; import { D as l } from "./chunks/index4.mjs"; import { p as i } from "./chunks/config.mjs"; import { E as n } from "./chunks/context.mjs"; const u = (e) => { const { editorId: o } = a(n), r = d(() => `${i}-toolbar-item${e.disabled ? " " + i + "-disabled" : ""}`, [e.disabled]); return /* @__PURE__ */ t( l, { relative: `#${o}-toolbar-wrapper`, visible: e.visible, onChange: e.onChange, overlay: e.overlay, disabled: e.disabled, children: /* @__PURE__ */ t( "button", { className: r, title: e.title || "", disabled: e.disabled, type: "button", children: e.children || e.trigger } ) } ); }; export { u as default };