@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
45 lines (44 loc) • 1.89 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 e from "react";
import { Button as r } from "@progress/kendo-react-buttons";
import { dispatchEvent as a } from "@progress/kendo-react-common";
class o extends e.Component {
constructor() {
super(...arguments), this.onBtnClick = (t, i) => {
a(this.props.onActionExecute, i, this, { action: t });
};
}
/**
* @hidden
*/
render() {
return /* @__PURE__ */ e.createElement("div", { className: "k-card" }, /* @__PURE__ */ e.createElement(
"img",
{
className: "k-card-image",
src: this.props.imageUrl,
style: { maxWidth: this.props.imageMaxWidth }
}
), /* @__PURE__ */ e.createElement("div", { className: "k-card-body" }, this.getTitleView(), this.getSubtitleView()), /* @__PURE__ */ e.createElement("div", { className: "k-card-actions k-card-actions-vertical" }, this.getActionsView()));
}
getActionsView() {
return this.props.actions.map((t, i) => /* @__PURE__ */ e.createElement("span", { className: "k-card-action", key: i }, /* @__PURE__ */ e.createElement(r, { fillMode: "flat", onClick: (s) => this.onBtnClick(t, s) }, t.title)));
}
getTitleView() {
let t = null;
return this.props.title && (t = /* @__PURE__ */ e.createElement("h5", { className: "k-card-title" }, this.props.title)), t;
}
getSubtitleView() {
let t = null;
return this.props.subtitle && (t = /* @__PURE__ */ e.createElement("h6", { className: "k-card-subtitle" }, this.props.subtitle)), t;
}
}
export {
o as HeroCard
};