import { useTranslation } from 'react-i18next' import type { GradientSpec } from '../../types' import { ColorField } from './ColorField' type Props = { title: string; value: GradientSpec; onChange: (patch: Partial) => void } /** A gradient slot: enable toggle, start/end colors and a 0–360° angle control. */ export function GradientField({ title, value, onChange }: Props) { const { t } = useTranslation('themes') return (
onChange({ start })} /> {value.enabled && ( <> onChange({ end })} /> )}
) }