Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
File size: 570 Bytes
a8fb296 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | interface Props {
on: boolean
onToggle: () => void
}
/** The sound switch in the top bar of every challenge screen. The choice is the caller's to remember. */
export default function SoundToggle({ on, onToggle }: Props) {
return (
<button type="button" className="folio-btn stance-sound" aria-pressed={on} onClick={onToggle} data-testid="stance-sound">
<span aria-hidden="true" className="stance-sound-icon">
{on ? '♪' : '×'}
</span>
<span className="stance-sound-label">{on ? 'Sound on' : 'Sound off'}</span>
</button>
)
}
|