diff options
author | crupest <crupest@outlook.com> | 2021-04-04 23:12:35 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-04-04 23:12:35 +0800 |
commit | 26c14ac0f2780c4489c5fb099e68c51e92a9b4b5 (patch) | |
tree | 7fc54f559561e69884bd34032d424d064ea09702 /FrontEnd/src/app/views/timeline-common/TimelineTop.tsx | |
parent | fcd581f21725d7d45e401f0bc3a77db18319ee97 (diff) | |
download | timeline-26c14ac0f2780c4489c5fb099e68c51e92a9b4b5.tar.gz timeline-26c14ac0f2780c4489c5fb099e68c51e92a9b4b5.tar.bz2 timeline-26c14ac0f2780c4489c5fb099e68c51e92a9b4b5.zip |
...
Diffstat (limited to 'FrontEnd/src/app/views/timeline-common/TimelineTop.tsx')
-rw-r--r-- | FrontEnd/src/app/views/timeline-common/TimelineTop.tsx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/FrontEnd/src/app/views/timeline-common/TimelineTop.tsx b/FrontEnd/src/app/views/timeline-common/TimelineTop.tsx index 6ee4e3e6..6382d2c5 100644 --- a/FrontEnd/src/app/views/timeline-common/TimelineTop.tsx +++ b/FrontEnd/src/app/views/timeline-common/TimelineTop.tsx @@ -1,21 +1,25 @@ import React from "react"; +import clsx from "clsx"; import TimelineLine, { TimelineLineProps } from "./TimelineLine"; export interface TimelineTopProps { height?: number | string; lineProps?: TimelineLineProps; - children?: React.ReactElement; + className?: string; + style?: React.CSSProperties; } const TimelineTop: React.FC<TimelineTopProps> = (props) => { - const { height, children } = props; + const { height, style, className } = props; const lineProps = props.lineProps ?? { center: "none" }; return ( - <div style={{ height: height }} className="timeline-top"> + <div + style={{ ...style, height: height }} + className={clsx("timeline-top", className)} + > <TimelineLine {...lineProps} /> - {children} </div> ); }; |