(props)
| 10 | } from 'reactstrap'; |
| 11 | |
| 12 | function Example(props) { |
| 13 | const [dropdownOpen, setDropdownOpen] = useState(false); |
| 14 | const [splitButtonOpen, setSplitButtonOpen] = useState(false); |
| 15 | |
| 16 | const toggleDropDown = () => setDropdownOpen(!dropdownOpen); |
| 17 | |
| 18 | const toggleSplit = () => setSplitButtonOpen(!splitButtonOpen); |
| 19 | |
| 20 | return ( |
| 21 | <div> |
| 22 | <InputGroup> |
| 23 | <Button>I‘m a button</Button> |
| 24 | <Input /> |
| 25 | </InputGroup> |
| 26 | <br /> |
| 27 | <InputGroup> |
| 28 | <Input /> |
| 29 | <ButtonDropdown isOpen={dropdownOpen} toggle={toggleDropDown}> |
| 30 | <DropdownToggle caret>Button Dropdown</DropdownToggle> |
| 31 | <DropdownMenu> |
| 32 | <DropdownItem header>Header</DropdownItem> |
| 33 | <DropdownItem disabled>Action</DropdownItem> |
| 34 | <DropdownItem>Another Action</DropdownItem> |
| 35 | <DropdownItem divider /> |
| 36 | <DropdownItem>Another Action</DropdownItem> |
| 37 | </DropdownMenu> |
| 38 | </ButtonDropdown> |
| 39 | </InputGroup> |
| 40 | <br /> |
| 41 | <InputGroup> |
| 42 | <ButtonDropdown isOpen={splitButtonOpen} toggle={toggleSplit}> |
| 43 | <Button outline>Split Button</Button> |
| 44 | <DropdownToggle split outline /> |
| 45 | <DropdownMenu> |
| 46 | <DropdownItem header>Header</DropdownItem> |
| 47 | <DropdownItem disabled>Action</DropdownItem> |
| 48 | <DropdownItem>Another Action</DropdownItem> |
| 49 | <DropdownItem divider /> |
| 50 | <DropdownItem>Another Action</DropdownItem> |
| 51 | </DropdownMenu> |
| 52 | </ButtonDropdown> |
| 53 | <Input placeholder="and..." /> |
| 54 | <Button color="secondary">I‘m a button</Button> |
| 55 | </InputGroup> |
| 56 | </div> |
| 57 | ); |
| 58 | } |
| 59 | |
| 60 | export default Example; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…