Skip to content

🎥 Make videos programmatically with React

new separator

Jonny Burger55d3469ee5bd
diff --git a/packages/studio/src/components/Timeline/TimelineList.tsx b/packages/studio/src/components/Timeline/TimelineList.tsx
index 23be58afb9..6b37fe9bec 100644
--- a/packages/studio/src/components/Timeline/TimelineList.tsx
+++ b/packages/studio/src/components/Timeline/TimelineList.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import {BACKGROUND} from '../../helpers/colors';
+import {BACKGROUND, TIMELINE_TRACK_SEPARATOR} from '../../helpers/colors';
import type {TrackWithHash} from '../../helpers/get-timeline-sequence-sort-key';
import {isTrackCollapsed} from './is-collapsed';
import type {
@@ -14,11 +14,13 @@ import {
const container: React.CSSProperties = {
flex: 1,
- display: 'flex',
- flexDirection: 'column',
background: BACKGROUND,
};
+const topSeparator: React.CSSProperties = {
+ borderBottom: '1px solid ' + TIMELINE_TRACK_SEPARATOR,
+};
+
export const TimelineList: React.FC<{
timeline: TrackWithHash[];
viewState: TimelineViewState;
@@ -27,10 +29,9 @@ export const TimelineList: React.FC<{
return (
<div style={container}>
<TimelineTimePadding />
-
+ <div style={topSeparator} />
{timeline.map((track, i) => {
const beforeDepth = i === 0 ? 0 : timeline[i - 1].depth;
-
return (
<div key={track.sequence.id}>
<TimelineListItem
diff --git a/packages/studio/src/components/Timeline/TimelineListItem.tsx b/packages/studio/src/components/Timeline/TimelineListItem.tsx
index 8daccc7332..0bd064004d 100644
--- a/packages/studio/src/components/Timeline/TimelineListItem.tsx
+++ b/packages/studio/src/components/Timeline/TimelineListItem.tsx
@@ -1,6 +1,6 @@
import React, {useCallback, useMemo} from 'react';
import type {TSequence} from 'remotion';
-import {LIGHT_COLOR} from '../../helpers/colors';
+import {LIGHT_COLOR, TIMELINE_TRACK_SEPARATOR} from '../../helpers/colors';
import {
TIMELINE_BORDER,
TIMELINE_LAYER_HEIGHT,
@@ -39,6 +39,7 @@ const outer: React.CSSProperties = {
paddingLeft: TIMELINE_PADDING,
wordBreak: 'break-all',
textAlign: 'left',
+ borderBottom: `1px solid ${TIMELINE_TRACK_SEPARATOR}`,
};
const hookContainer: React.CSSProperties = {
diff --git a/packages/studio/src/helpers/colors.ts b/packages/studio/src/helpers/colors.ts
index 30b7c3e0ea..a2067ea31d 100644
--- a/packages/studio/src/helpers/colors.ts
+++ b/packages/studio/src/helpers/colors.ts
@@ -20,6 +20,7 @@ export const LIGHT_TRANSPARENT = 'rgba(255, 255, 255, 0.7)';
export const UNSELECTED_GUIDE = '#7e1219';
export const SELECTED_GUIDE = '#d22d3a';
export const LINE_COLOR = '#363A3E';
+export const TIMELINE_TRACK_SEPARATOR = 'rgba(0, 0, 0, 0.3)';
export const getBackgroundFromHoverState = ({
selected,