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