flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS
23 lines (20 loc) • 937 B
JavaScript
'use client';
import { jsx } from 'react/jsx-runtime';
import { twMerge } from 'tailwind-merge';
import { mergeDeep } from '../../helpers/merge-deep.mjs';
import { TimelineContentContext } from './TimelineContentContext.mjs';
import { useTimelineContext } from './TimelineContext.mjs';
import { useTimelineItemContext } from './TimelineItemContext.mjs';
const TimelineContent = ({
children,
className,
theme: customTheme = {},
...props
}) => {
const { horizontal } = useTimelineContext();
const { theme: itemTheme } = useTimelineItemContext();
const theme = mergeDeep(itemTheme.content, customTheme);
return /* @__PURE__ */ jsx(TimelineContentContext.Provider, { value: { theme }, children: /* @__PURE__ */ jsx("div", { "data-testid": "timeline-content", className: twMerge(horizontal && theme.root.base, className), ...props, children }) });
};
export { TimelineContent };
//# sourceMappingURL=TimelineContent.mjs.map