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

59 lines (58 loc) 1.76 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 o from "react"; import { Button as n } from "@progress/kendo-react-buttons"; import { chevronRightIcon as c, chevronLeftIcon as m } from "@progress/kendo-svg-icons"; import { useLocalization as h } from "@progress/kendo-react-intl"; import { scrollLeft as u, messages as g, scrollRight as d } from "../../messages/index.mjs"; const R = ({ visible: b, dir: e, canScrollLeft: f, canScrollRight: p, onScrollLeft: L, onScrollRight: v, children: t }) => { const l = h(); if (!b) return t; const r = l.toLanguageString(u, g[u]), a = l.toLanguageString(d, g[d]), s = e !== "rtl" ? r : a, i = e !== "rtl" ? a : r; return /* @__PURE__ */ o.createElement("div", { className: "k-suggestion-scrollwrap" }, /* @__PURE__ */ o.createElement( n, { fillMode: "solid", themeColor: "base", size: "medium", rounded: "medium", svgIcon: e === "rtl" ? c : m, onClick: L, disabled: !f, className: "k-icon-button", "aria-label": s, title: s } ), t, /* @__PURE__ */ o.createElement( n, { fillMode: "solid", themeColor: "base", size: "medium", rounded: "medium", svgIcon: e === "rtl" ? m : c, onClick: v, disabled: !p, className: "k-icon-button", "aria-label": i, title: i } )); }; export { R as ScrollButtonsWrapper };