Skip to content
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.

Commit

Permalink
fix: fix flow errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewalczak committed Jan 9, 2019
1 parent 2a79284 commit 17687d1
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ type Props = {|
+customMarker?: React.Node,
|};

type OnLayout = {
+nativeEvent: {
+layout: {
+x: number,
+y: number,
+width: number,
+height: number,
},
},
};

type State = {
multiSliderValues: Array<number>,
singleSliderValue: Array<number>,
Expand All @@ -35,7 +46,11 @@ export default class Slider extends React.Component<Props, State> {
constructor(props: Props) {
super(props);

const { startValue, endValue } = this.props;
const { maxValue, startValue, endValue = maxValue } = this.props;

if (endValue > maxValue) {
console.error('End value cannot be equal or higher than maximum value');
}

this.state = {
width: 0,
Expand Down

0 comments on commit 17687d1

Please sign in to comment.