How to use the @nivo/tooltip.useTooltipHandlers function in @nivo/tooltip

To help you get started, we’ve selected a few @nivo/tooltip examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github plouc / nivo / packages / core / src / hocs / withContainer.js View on Github external
renderWrapper = true,
    children,
    animate,
    motionStiffness,
    motionDamping,
}) => {
    const container = useRef(null)
    const {
        showTooltipAt,
        showTooltipFromEvent,
        hideTooltip,
        isTooltipVisible,
        tooltipContent,
        tooltipPosition,
        tooltipAnchor,
    } = useTooltipHandlers(container)

    return (
        
            
                
                    {/* we should not render the div element if using the HTTP API */}
                    {renderWrapper === true && (
                        <div style="{containerStyle}">
                            {children}
                            {isTooltipVisible &amp;&amp; (</div>

@nivo/tooltip

<a href="https://nivo.rocks"><img alt="nivo" src="https://raw.githubusercontent.com/plouc/nivo/master/nivo.png" width="216" height="68"/></a>

MIT
Latest version published 1 month ago

Package Health Score

91 / 100
Full package analysis

Similar packages