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...
48 lines (47 loc) • 1.2 kB
JavaScript
import { jsxs as o, Fragment as c, jsx as l } from "react/jsx-runtime";
import { useMemo as u, useCallback as m } from "react";
import { M as b } from "./chunks/index.mjs";
import { p as i } from "./chunks/config.mjs";
const M = (t) => {
const { width: a = "auto", height: s = "auto" } = t, n = u(() => `${i}-toolbar-item${t.disabled ? " " + i + "-disabled" : ""}`, [t.disabled]), d = m(
(e) => {
t.onAdjust instanceof Function && t.onAdjust(e);
},
[t]
);
return /* @__PURE__ */ o(c, { children: [
/* @__PURE__ */ l(
"button",
{
className: n,
title: t.title,
onClick: (e) => {
t.onClick(e);
},
disabled: t.disabled,
type: "button",
children: t.trigger
}
),
/* @__PURE__ */ l(
b,
{
className: t.className,
style: t.style,
width: a,
height: s,
title: t.modalTitle,
visible: t.visible,
showMask: t.showMask,
onClose: t.onClose,
showAdjust: t.showAdjust,
isFullscreen: t.isFullscreen,
onAdjust: d,
children: t.children
}
)
] });
};
export {
M as default
};