(props)
| 2 | import { Collapse, Button, CardBody, Card } from 'reactstrap'; |
| 3 | |
| 4 | function Example(props) { |
| 5 | const [collapse, setCollapse] = useState(false); |
| 6 | const [status, setStatus] = useState('Closed'); |
| 7 | |
| 8 | const onEntering = () => setStatus('Opening...'); |
| 9 | const onEntered = () => setStatus('Opened'); |
| 10 | const onExiting = () => setStatus('Closing...'); |
| 11 | const onExited = () => setStatus('Closed'); |
| 12 | const toggle = () => setCollapse(!collapse); |
| 13 | |
| 14 | return ( |
| 15 | <div> |
| 16 | <Button color="primary" onClick={toggle} style={{ marginBottom: '1rem' }}> |
| 17 | Toggle |
| 18 | </Button> |
| 19 | <h5>Current state: {status}</h5> |
| 20 | <Collapse |
| 21 | isOpen={collapse} |
| 22 | onEntering={onEntering} |
| 23 | onEntered={onEntered} |
| 24 | onExiting={onExiting} |
| 25 | onExited={onExited} |
| 26 | > |
| 27 | <Card> |
| 28 | <CardBody> |
| 29 | Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus |
| 30 | terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer |
| 31 | labore wes anderson cred nesciunt sapiente ea proident. |
| 32 | </CardBody> |
| 33 | </Card> |
| 34 | </Collapse> |
| 35 | </div> |
| 36 | ); |
| 37 | } |
| 38 | |
| 39 | export default Example; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…