Skip to content

Commit

Permalink
fix(swarmplot): pass renderWrapper prop to container
Browse files Browse the repository at this point in the history
  • Loading branch information
wyze committed Jun 22, 2021
1 parent 6c906c0 commit 9977858
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
8 changes: 2 additions & 6 deletions packages/swarmplot/src/SwarmPlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,11 @@ export const SwarmPlot = <RawDatum,>({
isInteractive = defaultProps.isInteractive,
animate = defaultProps.animate,
motionConfig = defaultProps.motionConfig,
renderWrapper,
...otherProps
}: Partial<Omit<SwarmPlotSvgProps<RawDatum>, 'data' | 'groups' | 'width' | 'height'>> &
Pick<SwarmPlotSvgProps<RawDatum>, 'data' | 'groups' | 'width' | 'height'>) => (
<Container
isInteractive={isInteractive}
animate={animate}
motionConfig={motionConfig}
theme={theme}
>
<Container {...{ isInteractive, animate, motionConfig, theme, renderWrapper }}>
<InnerSwarmPlot<RawDatum> isInteractive={isInteractive} {...otherProps} />
</Container>
)
8 changes: 2 additions & 6 deletions packages/swarmplot/src/SwarmPlotCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,15 +309,11 @@ export const SwarmPlotCanvas = <RawDatum,>({
isInteractive = defaultProps.isInteractive,
animate = defaultProps.animate,
motionConfig = defaultProps.motionConfig,
renderWrapper,
...otherProps
}: Partial<Omit<SwarmPlotCanvasProps<RawDatum>, 'data' | 'groups' | 'width' | 'height'>> &
Pick<SwarmPlotCanvasProps<RawDatum>, 'data' | 'groups' | 'width' | 'height'>) => (
<Container
isInteractive={isInteractive}
animate={animate}
motionConfig={motionConfig}
theme={theme}
>
<Container {...{ isInteractive, animate, motionConfig, theme, renderWrapper }}>
<InnerSwarmPlotCanvas<RawDatum> isInteractive={isInteractive} {...otherProps} />
</Container>
)
1 change: 1 addition & 0 deletions packages/swarmplot/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export type SwarmPlotCommonProps<RawDatum> = {
animate: boolean
motionConfig: ModernMotionProps['motionConfig']
role: string
renderWrapper?: boolean
}

export type SwarmPlotSvgProps<RawDatum> = SwarmPlotCommonProps<RawDatum> &
Expand Down

0 comments on commit 9977858

Please sign in to comment.