Commit a148dac
authored
Change implementation of withChartViewport (#5542)
This simplifies the types a bit, making it easier to port to TypeScript.
I've split it into two commits so that the indentation change doesn't
distract from the code changes.
The only real change here is the splitting of the inner component into a
`ChartViewportFunctionComponent` and a `ChartViewportImpl<ChartProps>`
component. The only purpose of the function component is to take the
wrapped component `chart` from the closure scope and put it into a prop
of the Impl component.5 files changed
+689
-719
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 8 | + | |
13 | 9 | | |
14 | 10 | | |
15 | 11 | | |
| |||
525 | 521 | | |
526 | 522 | | |
527 | 523 | | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
| 524 | + | |
| 525 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
657 | 656 | | |
658 | 657 | | |
659 | 658 | | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
| 659 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
826 | 825 | | |
827 | 826 | | |
828 | 827 | | |
829 | | - | |
830 | | - | |
831 | | - | |
832 | | - | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
0 commit comments