UNPKG

@payfit/unity-components

Version:

43 lines (42 loc) • 1.59 kB
import { CircularIconButton as e } from "../../../../../core/components/icon-button/CircularIconButton.js"; import { Text as t } from "../../../../../core/components/text/Text.js"; import { forwardRef as n } from "react"; import { uyMerge as r } from "@payfit/unity-themes"; import { jsx as i, jsxs as a } from "react/jsx-runtime"; import { useTranslation as o } from "react-i18next"; import { Icon as s } from "@payfit/unity-icons"; //#region src/modules/ai-kit/components/ai-structured-input/parts/AIStructuredInputHeader.tsx var c = n(({ title: n, onClose: c, className: l, ...u }, d) => { let { t: f } = o("unity"); return /* @__PURE__ */ a("header", { ...u, ref: d, className: r("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__ */ a("div", { className: "uy:flex uy:min-w-0 uy:items-center uy:gap-50", children: [/* @__PURE__ */ i(s, { src: "InfoOutlined", size: 20, color: "content.neutral.low", "aria-hidden": "true", role: "presentation" }), /* @__PURE__ */ i(t, { asElement: "span", variant: "bodySmallStrong", color: "content.neutral.low", className: "uy:min-w-0", isTruncated: !0, children: n })] }), /* @__PURE__ */ i(e, { type: "button", icon: "CloseOutlined", title: f((e) => e.unity.component.common.close.label), onPress: c })] }); }); c.displayName = "AIStructuredInputHeader"; //#endregion export { c as AIStructuredInputHeader };