@progress/kendo-react-editor
Version:
React Editor enables users to create rich text content through a WYSIWYG interface. KendoReact Editor package
38 lines (37 loc) • 1.55 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 c from "react";
import { Button as f } from "@progress/kendo-react-buttons";
import { EditorToolsSettings as u } from "../config/toolsSettings.mjs";
import { isAligned as v, alignBlocks as T } from "@progress/kendo-editor-common";
import { onDownPreventDefault as h } from "./utils.mjs";
import { registerForLocalization as z, provideLocalizationService as A } from "@progress/kendo-react-intl";
import { messages as L } from "../messages/index.mjs";
const { alignRemove: m } = u, C = (t) => {
const n = class extends c.Component {
render() {
const { view: o, render: r, ...l } = this.props, a = o && o.state, e = !!a && v(a, t.actions), p = e ? m.actions : t.actions, d = e ? m.commandName : t.commandName, g = A(this), i = t.messages.title, s = /* @__PURE__ */ c.createElement(
f,
{
onClick: () => o && T(p, d)(o.state, o.dispatch),
selected: e,
togglable: !0,
...h,
title: g.toLanguageString(i, L[i]),
...t.props,
...l
}
);
return r ? r.call(void 0, s, { view: o }) : s;
}
};
return z(n), n;
};
export {
C as createAlignTool
};