@douyinfe/semi-ui
Version:
A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.
33 lines (32 loc) • 1.31 kB
TypeScript
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import '@douyinfe/semi-foundation/lib/cjs/timeline/timeline.css';
import Item, { TimelineItemProps } from './item';
export type { TimelineItemProps } from './item';
export interface Data extends TimelineItemProps {
content: React.ReactNode;
}
export interface TimelineProps extends Pick<React.AriaAttributes, 'aria-label'> {
mode?: 'left' | 'right' | 'center' | 'alternate';
className?: string;
style?: React.CSSProperties;
dataSource?: Data[];
children?: React.ReactNode;
}
declare class Timeline extends PureComponent<TimelineProps> {
static contextType: React.Context<import("../configProvider/context").ContextValue>;
static Item: typeof Item;
static propTypes: {
mode: PropTypes.Requireable<string>;
className: PropTypes.Requireable<string>;
style: PropTypes.Requireable<object>;
dataSource: PropTypes.Requireable<any[]>;
};
static defaultProps: {
mode: string;
};
getPosCls: (ele: React.ReactElement, idx: number) => string;
addClassName: (items: React.ReactNode) => (string | number | Iterable<React.ReactNode> | React.DetailedReactHTMLElement<unknown, HTMLElement>)[];
render(): React.JSX.Element;
}
export default Timeline;