diff --git a/app/audio/MidiEditor.tsx b/app/audio/MidiEditor.tsx index 0509221..c0382fe 100644 --- a/app/audio/MidiEditor.tsx +++ b/app/audio/MidiEditor.tsx @@ -1,6 +1,12 @@ "use client"; -import { useContext, useEffect, useRef, useState } from "react"; +import { + MouseEventHandler, + useContext, + useEffect, + useRef, + useState, +} from "react"; import { AudioContext } from "./AudioProvider"; import { AudioStorage, Stem } from "@/utils/types"; import { ArrowLeft, ArrowRight } from "lucide-react"; @@ -12,14 +18,15 @@ import { AccordionItem, AccordionTrigger, } from "@/components/ui/accordion"; +import { Slider } from "@/components/ui/slider"; export default function MidiEditor() { const { audioStorage } = useContext(AudioContext); - const midiAdjustments = useRef(null); - const audioControls = useRef(null); + const midiAdjustments = useRef(null); + const audioControls = useRef(null); const [controlsOpen, setControlsOpen] = useState(false); - const handleOpen = (_event: React.MouseEvent) => { + const handleOpen: MouseEventHandler = (event) => { setTimeout(() => { if (!midiAdjustments.current || !audioControls.current) return; console.log( @@ -57,28 +64,34 @@ export default function MidiEditor() { collapsible >
- - + + Midi Adjustments - - + + Audio Controls - - audio + +
diff --git a/app/globals.css b/app/globals.css index 5197bd4..56606ce 100644 --- a/app/globals.css +++ b/app/globals.css @@ -149,3 +149,17 @@ a, visibility 0.3s ease, background-color 150ms cubic-bezier(0.4, 0, 0.2, 1); } + +.SliderRoot[data-orientation="vertical"] { + flex-direction: column; + width: 20px; + height: 100px; +} + +.SliderTrack[data-orientation="vertical"] { + width: 3px; +} + +.SliderRange[data-orientation="vertical"] { + width: 100%; +} diff --git a/components/ui/slider.tsx b/components/ui/slider.tsx index 11883bc..480fbc0 100644 --- a/components/ui/slider.tsx +++ b/components/ui/slider.tsx @@ -12,15 +12,42 @@ const Slider = React.forwardRef< - - + + - + )); Slider.displayName = SliderPrimitive.Root.displayName;