(props)
| 2221 | ]; |
| 2222 | |
| 2223 | function SelectionStatic(props) { |
| 2224 | let {selectionMode = 'single'} = props; |
| 2225 | let [selected, setSelected] = React.useState<Selection>(new Set()); |
| 2226 | return ( |
| 2227 | <MenuTrigger> |
| 2228 | <Button>Menu Button</Button> |
| 2229 | <Popover> |
| 2230 | <Menu |
| 2231 | aria-label="Test" |
| 2232 | selectionMode={selectionMode} |
| 2233 | selectedKeys={selected} |
| 2234 | onSelectionChange={setSelected}> |
| 2235 | <MenuSection> |
| 2236 | <Header>Heading 1</Header> |
| 2237 | <MenuItem>Foo</MenuItem> |
| 2238 | <MenuItem>Bar</MenuItem> |
| 2239 | <MenuItem>Baz</MenuItem> |
| 2240 | <MenuItem>Fizz</MenuItem> |
| 2241 | </MenuSection> |
| 2242 | </Menu> |
| 2243 | </Popover> |
| 2244 | </MenuTrigger> |
| 2245 | ); |
| 2246 | } |
| 2247 | |
| 2248 | function SelectionDynamic(props) { |
| 2249 | let {selectionMode = 'single'} = props; |
nothing calls this directly
no outgoing calls
no test coverage detected