MCPcopy Create free account
hub / github.com/ahaoboy/js-engine-benchmark / EngineCheckboxes

Function EngineCheckboxes

web/src/EngineCheckboxes.tsx:9–40  ·  view source on GitHub ↗
({
  engines,
  selected,
  onChange,
}: EngineCheckboxesProps)

Source from the content-addressed store, hash-verified

7}
8
9export function EngineCheckboxes({
10 engines,
11 selected,
12 onChange,
13}: EngineCheckboxesProps) {
14 return (
15 <Box
16 sx={{ display: "flex", justifyContent: "center", alignItems: "center" }}
17 >
18 <FormGroup row>
19 {engines.map((engine) => (
20 <FormControlLabel
21 key={engine}
22 control={
23 <Checkbox
24 checked={selected.includes(engine)}
25 onChange={(e) => {
26 if (e.target.checked) {
27 onChange([...selected, engine]);
28 } else {
29 onChange(selected.filter((s) => s !== engine));
30 }
31 }}
32 />
33 }
34 label={engine}
35 />
36 ))}
37 </FormGroup>
38 </Box>
39 );
40}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected