MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / SwitchButton

Function SwitchButton

flow-debugger/debugger-ui/src/AppHeader.js:30–40  ·  view source on GitHub ↗
(is_on, off, on, onClick, disabled)

Source from the content-addressed store, hash-verified

28};
29
30const SwitchButton = (is_on, off, on, onClick, disabled) => {
31 return is_on ? (
32 <Button red bold onClick={onClick} disabled={disabled}>
33 {off}
34 </Button>
35 ) : (
36 <Button onClick={onClick} disabled={disabled}>
37 {on}
38 </Button>
39 );
40};
41
42export const AppHeader = () => {
43 const dispatch = useDispatch();

Callers 1

AppHeader.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected