diff --git a/app/app/components/transpose-bar.tsx b/app/app/components/transpose-bar.tsx new file mode 100644 index 0000000..e16c782 --- /dev/null +++ b/app/app/components/transpose-bar.tsx @@ -0,0 +1,85 @@ +import { useState } from "react"; +import { Button } from "~/components/ui/button"; +import { ChevronUp, ChevronDown, Minus, Plus } from "lucide-react"; +import type { SongMeta } from "~/lib/types"; + +interface Props { + meta: SongMeta; + offset: number; + onOffsetChange: (offset: number) => void; +} + +export function TransposeBar({ meta, offset, onOffsetChange }: Props) { + const [expanded, setExpanded] = useState(true); + + const label = offset === 0 + ? "±0" + : offset > 0 + ? `+${offset}` + : `${offset}`; + + if (!expanded) { + return ( +