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

Function Example

stories/examples/Tooltip/TooltipExample.js:4–32  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

2import { Tooltip } from 'reactstrap';
3
4function Example(args) {
5 const [tooltipOpen, setTooltipOpen] = useState(false);
6 const toggle = () => setTooltipOpen(!tooltipOpen);
7
8 return (
9 <div>
10 <p>
11 Somewhere in here is a{' '}
12 <a
13 href="https://example.com"
14 target="_blank"
15 rel="noreferrer"
16 id="TooltipExample"
17 >
18 tooltip
19 </a>
20 .
21 </p>
22 <Tooltip
23 {...args}
24 isOpen={tooltipOpen}
25 target="TooltipExample"
26 toggle={toggle}
27 >
28 Hello world!
29 </Tooltip>
30 </div>
31 );
32}
33
34Example.args = {
35 autohide: true,

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…