@frontify/fondue
Version:
Design system of Frontify
26 lines (25 loc) • 911 B
JavaScript
import { jsx as o } from "react/jsx-runtime";
import { useEditorState as n, useEventPlateId as m } from "@udecode/plate-core";
import { IconStylingWrapper as p } from "../../helper.es.js";
import { ToolbarButton as a } from "../../../components/Toolbar/ToolbarButton.es.js";
import { getTooltip as f } from "../../../helpers/getTooltip.es.js";
import { resetFormatting as l } from "../../../utils/resetFormatting.es.js";
import s from "../../../../../foundation/Icon/Generated/IconEraser16.es.js";
const b = ({ id: t, ...r }) => {
const e = n(m(t));
return /* @__PURE__ */ o(
a,
{
tooltip: f("Clear formatting"),
onPointerDown: (i) => {
i.preventDefault(), l(e);
},
...r,
children: /* @__PURE__ */ o(p, { icon: /* @__PURE__ */ o(s, {}) })
}
);
};
export {
b as ResetFormattingToolbarButton
};
//# sourceMappingURL=ResetFormattingToolbarButton.es.js.map