diff options
author | crupest <crupest@outlook.com> | 2021-04-04 15:59:23 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-04-04 15:59:23 +0800 |
commit | 6b71f05f5fc4b8df6e16fc33f482ccfcc3d9bb0b (patch) | |
tree | 9e1ed959f2ba9474a893047cc03594222d14fa72 /FrontEnd/src/app/views/timeline-common/TimelineTop.tsx | |
parent | b7783289bd819cc078cb996fcdb1ca6fdee5d484 (diff) | |
download | timeline-6b71f05f5fc4b8df6e16fc33f482ccfcc3d9bb0b.tar.gz timeline-6b71f05f5fc4b8df6e16fc33f482ccfcc3d9bb0b.tar.bz2 timeline-6b71f05f5fc4b8df6e16fc33f482ccfcc3d9bb0b.zip |
...
Diffstat (limited to 'FrontEnd/src/app/views/timeline-common/TimelineTop.tsx')
-rw-r--r-- | FrontEnd/src/app/views/timeline-common/TimelineTop.tsx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/FrontEnd/src/app/views/timeline-common/TimelineTop.tsx b/FrontEnd/src/app/views/timeline-common/TimelineTop.tsx index 39cfa426..6ee4e3e6 100644 --- a/FrontEnd/src/app/views/timeline-common/TimelineTop.tsx +++ b/FrontEnd/src/app/views/timeline-common/TimelineTop.tsx @@ -1,16 +1,20 @@ import React from "react"; -import TimelineLine from "./TimelineLine"; +import TimelineLine, { TimelineLineProps } from "./TimelineLine"; export interface TimelineTopProps { height?: number | string; + lineProps?: TimelineLineProps; children?: React.ReactElement; } -const TimelineTop: React.FC<TimelineTopProps> = ({ height, children }) => { +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 center={null} /> + <TimelineLine {...lineProps} /> {children} </div> ); |