MCPcopy Create free account
hub / github.com/css-for-js/character-creator / ToggleButton

Function ToggleButton

src/components/ToggleButton/ToggleButton.js:5–23  ·  view source on GitHub ↗
({
  label,
  color,
  children,
  isSelected,
  ...delegated
})

Source from the content-addressed store, hash-verified

3import styles from './ToggleButton.module.css';
4
5const 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
25export default ToggleButton;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected