modularity

This commit is contained in:
2025-09-30 14:20:50 +02:00
parent c16b3738ea
commit 304627b248
26 changed files with 892 additions and 198 deletions

View File

@ -1,5 +1,6 @@
import { Slider } from './Slider'
import { EFFECTS } from '../config/effects'
import { getClipModeLabel } from '../utils/formatters'
import type { EffectValues } from '../types/effects'
interface EffectsBarProps {
@ -8,6 +9,13 @@ interface EffectsBarProps {
}
export function EffectsBar({ values, onChange }: EffectsBarProps) {
const formatValue = (id: string, value: number): string => {
if (id === 'clipMode') {
return getClipModeLabel(value)
}
return value.toString()
}
return (
<div className="bg-black border-t-2 border-white px-6 py-4">
<div className="grid grid-cols-4 gap-6">
@ -22,6 +30,8 @@ export function EffectsBar({ values, onChange }: EffectsBarProps) {
step={param.step}
unit={param.unit}
onChange={(value) => onChange(param.id, value)}
formatValue={param.id === 'clipMode' ? formatValue : undefined}
valueId={param.id}
/>
))
)}