@primer/react-brand
Version:
Primer Brand is a GitHub's design system for creating React-based marketing websites and digital experiences.
33 lines (32 loc) • 1.6 kB
JavaScript
import e from "../node_modules/clsx/dist/clsx.js";
import { useAnimation as t } from "../animation/useAnimation.js";
import { Text as n } from "../Text/Text.js";
import r from "./Timeline.module.js";
import '../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/timeline/colors-with-modes-DDIdeMJX.css';import '../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/timeline/base-CXOJfjx4.css';/* empty css */
/* empty css */
import i, { useCallback as a, useMemo as o } from "react";
import { jsx as s } from "react/jsx-runtime";
var c = Object.assign(({ animate: n, className: i, children: a, fullWidth: o = !1, ...c }) => {
let { classes: l, styles: u } = t(n);
return /* @__PURE__ */ s("ul", {
className: e(l, r.Timeline, o && r["Timeline--full-width"], i),
style: { ...u },
...c,
children: a
});
}, { Item: ({ className: t, children: c, ...l }) => {
let u = e(r.Timeline__item, t), d = o(() => i.Children.toArray(c), [c]), f = a(() => d.some((e) => i.isValidElement(e) && (e.type === "b" || e.type === "em")) ? "muted" : "default", [d]), p = d.length === 1 ? "default" : f();
return /* @__PURE__ */ s("li", {
className: u,
...l,
children: /* @__PURE__ */ s(n, {
className: r["Timeline__item-text"],
size: "200",
variant: p,
children: c
})
});
} });
//#endregion
export { c as Timeline };
//# sourceMappingURL=Timeline.js.map