Skip to content

Commit

Permalink
feat(tooltip): ensure we only render the tooltip when the charts are …
Browse files Browse the repository at this point in the history
…interactive
  • Loading branch information
plouc committed Nov 15, 2020
1 parent 8addc8d commit 6623000
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/components/Container.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const Container = ({
children,
theme,
renderWrapper = true,
isInteractive = true,
animate,
motionStiffness,
motionDamping,
Expand All @@ -43,7 +44,7 @@ export const Container = ({
wrapper={<div style={containerStyle} ref={container} />}
>
{children}
<Tooltip />
{isInteractive && <Tooltip />}
</ConditionalWrapper>
</TooltipProvider>
</MotionConfigProvider>
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/hocs/withContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const withContainer = WrappedComponent => {
<Container
theme={theme}
renderWrapper={renderWrapper}
isInteractive={childProps.isInteractive}
animate={animate}
motionStiffness={motionStiffness}
motionDamping={motionDamping}
Expand Down

0 comments on commit 6623000

Please sign in to comment.