[Study programme] Delete component Toggle as unused

This commit is contained in:
Riku Rauhala
2025-03-19 14:33:05 +02:00
parent 2d44506c55
commit 0a6edf6638
@@ -1,21 +0,0 @@
import { Radio } from 'semantic-ui-react'
import { HoverableHelpPopup } from '@/components/common/HoverableHelpPopup'
interface ToggleProps {
cypress?: string
firstLabel: string
secondLabel: string
setValue: (value: boolean) => void
toolTips?: string
value: boolean
}
export const Toggle = ({ cypress, firstLabel, secondLabel, setValue, toolTips, value }: ToggleProps) => (
<div className="radio-toggle">
<label className={`toggle-label${value ? '-checked' : ''}`}>{firstLabel}</label>
<Radio checked={value} data-cy={cypress} onChange={() => setValue(!value)} toggle />
<label className={`toggle-label${value ? '' : '-checked'}`}>{secondLabel}</label>
{toolTips && <HoverableHelpPopup content={toolTips} style={{ marginLeft: '0.4em', color: '#888' }} />}
</div>
)