MCPcopy Create free account
hub / github.com/reactstrap/reactstrap / Example

Function Example

stories/examples/Navbar/TogglerExample.js:12–39  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

10} from 'reactstrap';
11
12function Example(props) {
13 const [collapsed, setCollapsed] = useState(true);
14
15 const toggleNavbar = () => setCollapsed(!collapsed);
16
17 return (
18 <div>
19 <Navbar color="faded" light>
20 <NavbarBrand href="/" className="me-auto">
21 reactstrap
22 </NavbarBrand>
23 <NavbarToggler onClick={toggleNavbar} className="me-2" />
24 <Collapse isOpen={!collapsed} navbar>
25 <Nav navbar>
26 <NavItem>
27 <NavLink href="/components/">Components</NavLink>
28 </NavItem>
29 <NavItem>
30 <NavLink href="https://github.com/reactstrap/reactstrap">
31 GitHub
32 </NavLink>
33 </NavItem>
34 </Nav>
35 </Collapse>
36 </Navbar>
37 </div>
38 );
39}
40
41export default Example;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…