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

Function Example

stories/examples/Collapse/CollapseExample.js:4–25  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

2import { Collapse, Button, CardBody, Card } from 'reactstrap';
3
4function Example(args) {
5 const [isOpen, setIsOpen] = useState(false);
6
7 const toggle = () => setIsOpen(!isOpen);
8
9 return (
10 <React.StrictMode>
11 <Button color="primary" onClick={toggle} style={{ marginBottom: '1rem' }}>
12 Toggle
13 </Button>
14 <Collapse isOpen={isOpen} {...args}>
15 <Card>
16 <CardBody>
17 Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus
18 terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer
19 labore wes anderson cred nesciunt sapiente ea proident.
20 </CardBody>
21 </Card>
22 </Collapse>
23 </React.StrictMode>
24 );
25}
26
27export 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…