diff options
| author | crupest <crupest@outlook.com> | 2020-11-04 12:29:55 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-04 12:29:55 +0800 |
| commit | 1e9e5eb89099ffaa454635fdd7271cece757fb2d (patch) | |
| tree | 1f19646ac27a3dcd4680e871f34218b85b0915d8 /FrontEnd/src/app/views/timeline-common/Timeline.tsx | |
| parent | f3503b399ff7b65f363beca313c8a0c336884bec (diff) | |
| parent | 1ba32f233677cad56636462b1f6552ff6e800801 (diff) | |
| download | timeline-1e9e5eb89099ffaa454635fdd7271cece757fb2d.tar.gz timeline-1e9e5eb89099ffaa454635fdd7271cece757fb2d.tar.bz2 timeline-1e9e5eb89099ffaa454635fdd7271cece757fb2d.zip | |
Merge pull request #165 from crupest/timeline
Redesign timeline ui.
Diffstat (limited to 'FrontEnd/src/app/views/timeline-common/Timeline.tsx')
| -rw-r--r-- | FrontEnd/src/app/views/timeline-common/Timeline.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/FrontEnd/src/app/views/timeline-common/Timeline.tsx b/FrontEnd/src/app/views/timeline-common/Timeline.tsx index fd051d45..9047919c 100644 --- a/FrontEnd/src/app/views/timeline-common/Timeline.tsx +++ b/FrontEnd/src/app/views/timeline-common/Timeline.tsx @@ -4,6 +4,7 @@ import clsx from "clsx"; import { TimelinePostInfo } from "@/services/timeline"; import TimelineItem from "./TimelineItem"; +import TimelineTop from "./TimelineTop"; export interface TimelinePostInfoEx extends TimelinePostInfo { deletable: boolean; @@ -13,6 +14,7 @@ export type TimelineDeleteCallback = (index: number, id: number) => void; export interface TimelineProps { className?: string; + style?: React.CSSProperties; posts: TimelinePostInfoEx[]; onDelete: TimelineDeleteCallback; onResize?: () => void; @@ -51,7 +53,12 @@ const Timeline: React.FC<TimelineProps> = (props) => { }, [posts, onDelete]); return ( - <div ref={props.containerRef} className={clsx("timeline", props.className)}> + <div + ref={props.containerRef} + style={props.style} + className={clsx("timeline", props.className)} + > + <TimelineTop height="56px" /> {(() => { const length = posts.length; return posts.map((post, i) => { |
