@payfit/unity-components
Version:
36 lines (35 loc) • 1.26 kB
JavaScript
import { Text as e } from "../../text/Text.js";
import { useTimelineStepContext as t } from "./TimelineStep.context.js";
import { useIsHorizontalDesktop as n } from "../Timeline.utils.js";
import { useTimelineStepContentContext as r } from "./TimelineStepContent.context.js";
import { forwardRef as i } from "react";
import { jsx as a, jsxs as o } from "react/jsx-runtime";
//#region src/components/timeline/parts/TimelineStepHeader.tsx
var s = i(({ title: i, subtitle: s, asHeader: c = "h3" }, l) => {
let { statusSlot: u } = r(), { labelId: d } = t(), f = !n() && u;
return /* @__PURE__ */ o("header", {
ref: l,
className: "uy:flex uy:flex-col uy:gap-0 uy:items-start uy:w-full",
children: [/* @__PURE__ */ o("div", {
className: "uy:flex uy:gap-100 uy:items-start uy:w-full",
children: [/* @__PURE__ */ a(e, {
variant: "bodyStrong",
color: "content.neutral",
className: "uy:flex-1",
asElement: c,
id: d,
children: i
}), f && /* @__PURE__ */ a("div", {
"aria-hidden": "true",
children: u
})]
}), s && /* @__PURE__ */ a(e, {
variant: "bodySmall",
color: "content.neutral.lowest",
children: s
})]
});
});
s.displayName = "TimelineStepHeader";
//#endregion
export { s as TimelineStepHeader };