Skip to content

Commit

Permalink
feat(bar): pass showTooltip and hideTooltip functions to custom layers
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Callaghan authored and plouc committed Apr 15, 2020
1 parent 98a4f43 commit f1bff16
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/bar/src/Bar.js
Expand Up @@ -318,7 +318,11 @@ const Bar = props => {
>
{layers.map((layer, i) => {
if (typeof layer === 'function') {
return <Fragment key={i}>{layer({ ...props, ...result })}</Fragment>
return (
<Fragment key={i}>
{layer({ ...props, ...result, showTooltip, hideTooltip })}
</Fragment>
)
}
return layerById[layer]
})}
Expand Down

0 comments on commit f1bff16

Please sign in to comment.