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 9003995 commit ce3abfe
Show file tree
Hide file tree
Showing 2 changed files with 17 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
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export { Text } from './Text';
export { TextInput } from './TextInput';
export { Tooltip, TooltipBubble } from './Tooltip';
export { DatePicker } from './DatePicker';
export { Slider } from './Slider';

/* Utils */
export { StyleSheet } from './PlatformStyleSheet';
Expand Down

0 comments on commit ce3abfe

Please sign in to comment.