@progress/kendo-react-editor
Version:
React Editor enables users to create rich text content through a WYSIWYG interface. KendoReact Editor package
35 lines (34 loc) • 1.41 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import * as l from "react";
import { Button as u } from "@progress/kendo-react-buttons";
import { useLocalization as f } from "@progress/kendo-react-intl";
import { onDownPreventDefault as g } from "./utils.mjs";
import { messages as w } from "../messages/index.mjs";
import { EditorToolsSettings as b } from "../config/toolsSettings.mjs";
import { classNames as v } from "@progress/kendo-react-common";
const { print: k } = b, S = (d) => {
const { view: t, render: i, settings: e = k, ...n } = d, r = t && t.dom, a = r && r.ownerDocument, o = a && a.defaultView, m = e.messages.title, s = !o || o === window, p = l.useCallback(() => {
o && o.print();
}, [o]), c = /* @__PURE__ */ l.createElement(
u,
{
onClick: s ? void 0 : p,
"aria-disabled": s ? !0 : void 0,
title: f().toLanguageString(m, w[m]),
...g,
...e.props,
...n,
className: v(n.className, e.props.className, { "k-disabled": s })
}
);
return i ? i.call(void 0, c, { view: t }) : c;
};
export {
S as Print
};