diff options
author | crupest <crupest@outlook.com> | 2021-01-13 17:14:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-13 17:14:34 +0800 |
commit | a23b8af0b06be2ab58d1831a0a25a30d934ec1e2 (patch) | |
tree | 7cb86b62d0e36adc4ce356d7986ff695bc244417 /FrontEnd/src/app/views/timeline-common/TimelineLine.tsx | |
parent | 717b6d87a133ce39b302176b35918892bcc01894 (diff) | |
parent | 4a633a0f83a3a7cf18feead821fcdff2453de926 (diff) | |
download | timeline-a23b8af0b06be2ab58d1831a0a25a30d934ec1e2.tar.gz timeline-a23b8af0b06be2ab58d1831a0a25a30d934ec1e2.tar.bz2 timeline-a23b8af0b06be2ab58d1831a0a25a30d934ec1e2.zip |
Merge pull request #209 from crupest/front-dev
Front development.
Diffstat (limited to 'FrontEnd/src/app/views/timeline-common/TimelineLine.tsx')
-rw-r--r-- | FrontEnd/src/app/views/timeline-common/TimelineLine.tsx | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/FrontEnd/src/app/views/timeline-common/TimelineLine.tsx b/FrontEnd/src/app/views/timeline-common/TimelineLine.tsx new file mode 100644 index 00000000..fd7dde0a --- /dev/null +++ b/FrontEnd/src/app/views/timeline-common/TimelineLine.tsx @@ -0,0 +1,33 @@ +import clsx from "clsx"; +import React from "react"; + +export interface TimelineLineProps { + current?: boolean; + startSegmentLength?: string | number; + center: "node" | null; + className?: string; + style?: React.CSSProperties; +} + +const TimelineLine: React.FC<TimelineLineProps> = ({ + startSegmentLength, + center, + current, + className, + style, +}) => { + return ( + <div className={clsx("timeline-line", className)} style={style}> + <div className="segment start" style={{ height: startSegmentLength }} /> + {center == "node" ? ( + <div className="node-container"> + <div className="node"></div> + </div> + ) : null} + <div className="segment end"></div> + {current && <div className="segment current-end" />} + </div> + ); +}; + +export default TimelineLine; |