@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
29 lines (28 loc) • 1.48 kB
TypeScript
import type { AllHTMLAttributes, ReactElement, Ref } from 'react';
import type { SpacingProps } from '../../shared/types';
import type { SkeletonShow } from '../skeleton/Skeleton';
import type { TimelineItemProps } from './TimelineItem';
import TimelineItem from './TimelineItem';
export type TimelineProps = {
/**
* If set to `true`, an overlaying skeleton with animation will be shown.
*/
skeleton?: SkeletonShow;
/**
* List of [timeline items](/uilib/components/timeline/properties#timelineitem-properties) to render. Each object in data can include all properties from [Timeline.Item properties](/uilib/components/timeline/properties#timelineitem-properties).
*/
data?: TimelineItemProps[];
/**
* Content of the component. Can be used instead of property `data`, by adding [Timeline Item](/uilib/components/timeline/properties#timelineitem-properties) as children `<Timeline.Item {...properties} />`.
*/
children?: ReactElement<TimelineItemProps>[] | ReactElement<TimelineItemProps>;
};
export type TimelineAllProps = TimelineProps & Omit<AllHTMLAttributes<HTMLOListElement>, 'type' | 'data'> & SpacingProps & {
ref?: Ref<HTMLOListElement>;
};
declare const Timeline: {
(localProps: TimelineAllProps): import("react/jsx-runtime").JSX.Element;
Item: (localProps: import("./TimelineItem").TimelineItemAllProps) => import("react/jsx-runtime").JSX.Element;
};
export { TimelineItem };
export default Timeline;