|
| 1 | +import React from 'react'; |
| 2 | +import { CheckboxGroup, Flex, Text } from '@deephaven/components'; |
| 3 | +// eslint-disable-next-line no-restricted-imports |
| 4 | +import { Checkbox } from '@adobe/react-spectrum'; |
| 5 | +import SampleSection from './SampleSection'; |
| 6 | + |
| 7 | +export function CheckboxGroups(): JSX.Element { |
| 8 | + return ( |
| 9 | + <SampleSection name="checkbox-groups"> |
| 10 | + <h2 className="ui-title">Checkbox Groups</h2> |
| 11 | + <Flex gap="size-100" gridColumn="span 3" height="100%"> |
| 12 | + <Flex direction="column"> |
| 13 | + <Text>Single Child</Text> |
| 14 | + <CheckboxGroup aria-label="Single Child"> |
| 15 | + <Checkbox value="Aaa">Aaa</Checkbox> |
| 16 | + </CheckboxGroup> |
| 17 | + </Flex> |
| 18 | + |
| 19 | + <Flex direction="column"> |
| 20 | + <Text>Multiple Children</Text> |
| 21 | + <CheckboxGroup aria-label="Multiple Children"> |
| 22 | + <Checkbox value="Aaa">Aaa</Checkbox> |
| 23 | + <Checkbox value="Bbb">Bbb</Checkbox> |
| 24 | + <Checkbox value="Ccc">Ccc</Checkbox> |
| 25 | + </CheckboxGroup> |
| 26 | + </Flex> |
| 27 | + |
| 28 | + <Flex direction="column"> |
| 29 | + <Text>Mixed Children Types</Text> |
| 30 | + <CheckboxGroup aria-label="Mixed Children Types"> |
| 31 | + {/* eslint-disable react/jsx-curly-brace-presence */} |
| 32 | + {'String 1'} |
| 33 | + {'String 2'} |
| 34 | + {444} |
| 35 | + {999} |
| 36 | + {true} |
| 37 | + {false} |
| 38 | + <Checkbox>Aaa</Checkbox> |
| 39 | + </CheckboxGroup> |
| 40 | + </Flex> |
| 41 | + </Flex> |
| 42 | + </SampleSection> |
| 43 | + ); |
| 44 | +} |
| 45 | + |
| 46 | +export default CheckboxGroups; |
0 commit comments