UNPKG

@progress/kendo-react-conversational-ui

Version:

React Chat component allows the user to participate in chat sessions with users or chat bots. KendoReact Conversational UI components

34 lines (33 loc) 1.31 kB
/** * @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 e from "react"; import { classNames as m, focusFirstFocusableChild as u, TABBABLE_ELEMENTS as i } from "@progress/kendo-react-common"; import { Toolbar as f } from "@progress/kendo-react-buttons"; const d = e.forwardRef((t, s) => { const { className: a, ...n } = t, r = e.useRef(null), o = e.useRef(null); e.useImperativeHandle(o, () => ({ element: r.current, props: t })), e.useImperativeHandle(s, () => o.current); const c = e.useMemo(() => m("k-chat-toolbar k-toolbar", a), [a]); return e.useEffect(() => { r.current !== null && u(r.current, [...i]); }, []), /* @__PURE__ */ e.createElement( f, { id: t.id, ref: (l) => { l && (r.current = l.element); }, className: c, ...n }, /* @__PURE__ */ e.createElement("div", { className: "k-button-list k-toolbar-group" }, t.children) ); }); d.displayName = "KendoReactChatToolbar"; export { d as ChatToolbar };