blob: 6ee4e3e67588bdc8b1f6a478ed9268d89e5d753b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import React from "react";
import TimelineLine, { TimelineLineProps } from "./TimelineLine";
export interface TimelineTopProps {
height?: number | string;
lineProps?: TimelineLineProps;
children?: React.ReactElement;
}
const TimelineTop: React.FC<TimelineTopProps> = (props) => {
const { height, children } = props;
const lineProps = props.lineProps ?? { center: "none" };
return (
<div style={{ height: height }} className="timeline-top">
<TimelineLine {...lineProps} />
{children}
</div>
);
};
export default TimelineTop;
|