Skip to content

Commit 6918680

Browse files
committed
Better types
1 parent 33dfc5f commit 6918680

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ColorScaleDataViewer.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ type Props = DataViewerProps & {
1919
columnMaxValue: number,
2020
columnMinValue: number,
2121
columnSize: number,
22-
minPoint: ColorScalePoint | { type: "minimum", color: string },
23-
midPoint: ColorScalePoint,
24-
maxPoint: ColorScalePoint | { type: "maximum", color: string }
22+
minPoint: MinPoint,
23+
midPoint: MidPoint,
24+
maxPoint: MaxPoint
2525
};
2626

2727
const resolveColor = (props: Props): ?string => {
@@ -55,9 +55,9 @@ const resolveColor = (props: Props): ?string => {
5555
const ColorScaleDataViewer = (props: Props) => {
5656
const color = resolveColor(props);
5757
return (
58-
<div style={{ backgroundColor: color }}>
59-
<DataViewer {...props} />
60-
</div>
58+
<div style={{ backgroundColor: color }}>
59+
<DataViewer {...props} />
60+
</div>
6161
);
6262
};
6363

0 commit comments

Comments
 (0)