Timeline tweaks for mobile (#10726)

* add dense prop, combine duplicate code, fix mobile bug

* put segment height in hook

* playground
This commit is contained in:
Josh Hawkins
2024-03-28 10:03:06 -05:00
committed by GitHub
parent 985b2d7b27
commit 36d5e5b45f
10 changed files with 258 additions and 348 deletions
@@ -30,6 +30,7 @@ type EventSegmentProps = {
severityType: ReviewSeverity;
contentRef: RefObject<HTMLDivElement>;
setHandlebarTime?: React.Dispatch<React.SetStateAction<number>>;
dense: boolean;
};
export function EventSegment({
@@ -43,6 +44,7 @@ export function EventSegment({
severityType,
contentRef,
setHandlebarTime,
dense,
}: EventSegmentProps) {
const {
getSeverity,
@@ -212,6 +214,7 @@ export function EventSegment({
alignedMinimapStartTime={alignedMinimapStartTime}
alignedMinimapEndTime={alignedMinimapEndTime}
firstMinimapSegmentRef={firstMinimapSegmentRef}
dense={dense}
/>
)}