MCPcopy Create free account
hub / github.com/callstack/react-native-paper / Switch

Function Switch

docs/src/components/Switch.tsx:9–29  ·  view source on GitHub ↗
({ value, onValueChange, color }: SwitchProps)

Source from the content-addressed store, hash-verified

7}
8
9const Switch = ({ value, onValueChange, color }: SwitchProps) => {
10 const background = value ? color : 'none';
11 return (
12 <>
13 <input
14 checked={value}
15 onChange={onValueChange}
16 className="react-switch-checkbox"
17 id={`react-switch-new`}
18 type="checkbox"
19 />
20 <label
21 style={{ background }}
22 className="react-switch-label"
23 htmlFor={`react-switch-new`}
24 >
25 <span className={`react-switch-button`} />
26 </label>
27 </>
28 );
29};
30
31export default Switch;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…