Skip to content

Commit b1d0b10

Browse files
committed
fix: default audio waveform color from timeline theme
1 parent 94eed96 commit b1d0b10

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

apps/web/src/components/editor/panels/timeline/audio-waveform.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import { useCallback, useEffect, useLayoutEffect, useRef } from "react";
44
import { useResizeObserver } from "@/hooks/use-resize-observer";
5+
import { TIMELINE_AUDIO_WAVEFORM_COLOR } from "./theme";
56
import {
67
buildWaveformSampleBuckets,
78
sampleSourceWaveformSummary,
@@ -64,7 +65,7 @@ export function AudioWaveform({
6465
clipDurationSec,
6566
retime,
6667
sourceStartSec,
67-
color,
68+
color = TIMELINE_AUDIO_WAVEFORM_COLOR,
6869
burnColor = WAVEFORM_BURN_COLOR,
6970
className = "",
7071
}: AudioWaveformProps) {

apps/web/src/components/editor/panels/timeline/theme.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import type { TrackType } from "@/lib/timeline";
22

3+
export const TIMELINE_AUDIO_WAVEFORM_COLOR = "rgba(255, 255, 255, 0.7)";
4+
35
export const TIMELINE_TRACK_THEME: Record<
46
TrackType,
57
{
@@ -11,7 +13,7 @@ export const TIMELINE_TRACK_THEME: Record<
1113
text: { elementClassName: "bg-[#5DBAA0]" },
1214
audio: {
1315
elementClassName: "bg-[#8F5DBA]",
14-
waveformColor: "rgba(255, 255, 255, 0.7)",
16+
waveformColor: TIMELINE_AUDIO_WAVEFORM_COLOR,
1517
},
1618
graphic: { elementClassName: "bg-[#BA5D7A]" },
1719
effect: { elementClassName: "bg-[#5d93ba]" },

0 commit comments

Comments
 (0)