Skip to content

Commit

Permalink
fix: pass <Plot> children down (#534)
Browse files Browse the repository at this point in the history
  • Loading branch information
TCL735 authored Apr 9, 2021
1 parent 3f6c577 commit af483ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion giraffe/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@influxdata/giraffe",
"version": "2.7.3",
"version": "2.7.4",
"main": "dist/index.js",
"module": "src/index.js",
"license": "MIT",
Expand Down
9 changes: 7 additions & 2 deletions giraffe/src/components/Plot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ interface PlotProps {
}

export const Plot: FunctionComponent<PlotProps> = ({
children,
config,
axesCanvasRef = useRef<HTMLCanvasElement>(null),
layerCanvasRef = useRef<HTMLCanvasElement>(null),
Expand All @@ -24,7 +25,9 @@ export const Plot: FunctionComponent<PlotProps> = ({
height={config.height}
layerCanvasRef={layerCanvasRef}
width={config.width}
/>
>
{children}
</PlotResizer>
</div>
)
}
Expand All @@ -38,7 +41,9 @@ export const Plot: FunctionComponent<PlotProps> = ({
height={height}
layerCanvasRef={layerCanvasRef}
width={width}
/>
>
{children}
</PlotResizer>
)}
</AutoSizer>
)
Expand Down

0 comments on commit af483ac

Please sign in to comment.