import { motion } from 'framer-motion'; import { memo } from 'react'; import { classNames } from '~/utils/classNames'; import '~/styles/components/SettingsSlider.scss'; interface SliderOption { value: T; text: string; } export interface SliderOptions { left: SliderOption; right: SliderOption; } interface SettingsSliderProps { selected: T; options: SliderOptions; setSelected?: (selected: T) => void; } export const SettingsSlider = memo(({ selected, options, setSelected }: SettingsSliderProps) => { const isLeftSelected = selected === options.left.value; return (
); });