@progress/kendo-react-labels
Version:
React Labels package provides components for labelling form editors. KendoReact Labels package
38 lines (37 loc) • 1.14 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 t from "react";
import r from "prop-types";
import { useUnstyled as i, classNames as l, uError as d } from "@progress/kendo-react-common";
const n = (a) => {
const e = {
direction: "start",
...a
}, s = i(), o = s && s.uError, c = t.useMemo(
() => l(
d.wrapper({
c: o,
direction: e.direction
}),
e.className
),
[o, e.direction, e.className]
);
return /* @__PURE__ */ t.createElement("div", { id: e.id, role: "alert", style: e.style, className: c }, e.children);
};
n.propTypes = {
id: r.string,
direction: r.oneOf(["start", "end"]),
children: r.oneOfType([r.element, r.node]),
style: r.object,
className: r.string
};
n.displayName = "KendoReactError";
export {
n as Error
};