@payfit/unity-components
Version:
32 lines (31 loc) • 955 B
JavaScript
import { useTimelineContext as e } from "../Timeline.context.js";
import { timelineContent as t } from "../Timeline.variants.js";
import { useIsHorizontalDesktop as n } from "../Timeline.utils.js";
import { TimelineStepContentProvider 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/TimelineStepContent.tsx
var s = i(({ className: i, children: s, statusSlot: c, actionSlot: l }, u) => {
let { orientation: d } = e(), f = n();
return /* @__PURE__ */ a(r, {
statusSlot: c,
children: /* @__PURE__ */ o("div", {
ref: u,
className: t({
orientation: d,
className: i
}),
children: [
s,
f && c && /* @__PURE__ */ a("div", {
"aria-hidden": "true",
children: c
}),
l
]
})
});
});
s.displayName = "TimelineStepContent";
//#endregion
export { s as TimelineStepContent };