({
label,
color,
children,
isSelected,
...delegated
})
| 3 | import styles from './ToggleButton.module.css'; |
| 4 | |
| 5 | const ToggleButton = ({ |
| 6 | label, |
| 7 | color, |
| 8 | children, |
| 9 | isSelected, |
| 10 | ...delegated |
| 11 | }) => { |
| 12 | return ( |
| 13 | <button |
| 14 | {...delegated} |
| 15 | aria-pressed={isSelected} |
| 16 | className={styles.toggleButton} |
| 17 | style={{ backgroundColor: color }} |
| 18 | > |
| 19 | <span className="visually-hidden">{label}</span> |
| 20 | {children} |
| 21 | </button> |
| 22 | ); |
| 23 | }; |
| 24 | |
| 25 | export default ToggleButton; |
nothing calls this directly
no outgoing calls
no test coverage detected