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...

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