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

Function TooltipItem

stories/examples/Tooltip/DirectionsExample.js:5–26  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

3import PropTypes from 'prop-types';
4
5function TooltipItem(props) {
6 const { item, id } = props;
7 const [tooltipOpen, setTooltipOpen] = useState(false);
8
9 const toggle = () => setTooltipOpen(!tooltipOpen);
10
11 return (
12 <span>
13 <Button className="me-1" color="secondary" id={'Tooltip-' + id}>
14 {item.text}
15 </Button>
16 <Tooltip
17 placement={item.placement}
18 isOpen={tooltipOpen}
19 target={'Tooltip-' + id}
20 toggle={toggle}
21 >
22 Tooltip Content!
23 </Tooltip>
24 </span>
25 );
26}
27
28TooltipItem.propTypes = {
29 item: PropTypes.object,

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…