UNPKG

@payfit/unity-components

Version:

43 lines (42 loc) • 1.61 kB
import { Icon as e } from "../../../../../core/components/icon/Icon.js"; import { CircularIconButton as t } from "../../../../../core/components/icon-button/CircularIconButton.js"; import { Text as n } from "../../../../../core/components/text/Text.js"; import { forwardRef as r } from "react"; import { uyMerge as i } from "@payfit/unity-themes"; import { jsx as a, jsxs as o } from "react/jsx-runtime"; import { useIntl as s } from "react-intl"; //#region src/modules/ai-kit/components/ai-structured-input/parts/AIStructuredInputHeader.tsx var c = r(({ title: r, onClose: c, className: l, ...u }, d) => { let f = s(); return /* @__PURE__ */ o("header", { ...u, ref: d, className: i("uy:flex uy:w-full uy:items-center uy:justify-between uy:rounded-t-200", "uy:bg-surface-neutral-lowest uy:py-75 uy:pl-150 uy:pr-75", l), "data-unity-slot": "ai.structured-input.header", children: [/* @__PURE__ */ o("div", { className: "uy:flex uy:min-w-0 uy:items-center uy:gap-50", children: [/* @__PURE__ */ a(e, { src: "InfoOutlined", size: 20, color: "content.neutral.low", "aria-hidden": "true", role: "presentation" }), /* @__PURE__ */ a(n, { asElement: "span", variant: "bodySmallStrong", color: "content.neutral.low", className: "uy:min-w-0", isTruncated: !0, children: r })] }), /* @__PURE__ */ a(t, { type: "button", icon: "CloseOutlined", title: f.formatMessage({ id: "unity:component:common:close:label" }), onPress: c })] }); }); c.displayName = "AIStructuredInputHeader"; //#endregion export { c as AIStructuredInputHeader };