import Tooltip from "@intility/bifrost-react/Tooltip";
Rewritten in 5.0
Single child element
The nested content of <Tooltip> needs to be a single element able to hold a
ref, unless an element reference is passed to the reference prop. It should
work with most Bifrost components and default html elements.
To make it accessible for keyboard users, make sure to use a focusable element
like <Button>.
<Tooltipcontent="The muffin man?!"><Button>Do you know?</Button></Tooltip><Tooltipstate="neutral"content={<div>
That you lost the game?
<Iconicon={faHeartCrack}marginLeft/></div>}><Buttonvariant="filled">Did you know?</Button></Tooltip>
import{useState}from"react";importTooltipfrom"@intility/bifrost-react/Tooltip";importButtonfrom"@intility/bifrost-react/Button";exportdefaultfunction(){const[visible,setVisible] = useState(true);return(<Tooltipcontent="Click the button to toggle me!"visible={visible}><ButtononClick={()=>setVisible(!visible)}style={{margin:0}}>
Some button
</Button></Tooltip>);}