Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
declare module 'react-native-slider' {
import { ComponentClass, PureComponent } from 'react'
import { ComponentClass } from 'react'

import {
ImageSourcePropType,
SpringAnimationConfig,
StyleProp,
TimingAnimationConfig,
Animated,
ViewStyle,
} from 'react-native'

Expand All @@ -18,13 +16,13 @@ declare module 'react-native-slider' {
* *This is not a controlled component*, e.g. if you don't update
* the value, the component won't be reset to its inital value.
*/
value?: number
value: number

/**
* If true the user won't be able to move the slider.
* Default value is false.
*/
disabled: boolean
disabled?: boolean

/**
* Initial minimum value of the slider. Default value is 0.
Expand Down Expand Up @@ -88,17 +86,17 @@ declare module 'react-native-slider' {
/**
* The style applied to the slider container.
*/
style?: StyleProp<ViewStyle>
style?: ViewStyle

/**
* The style applied to the track.
*/
trackStyle?: StyleProp<ViewStyle>
trackStyle?: ViewStyle;

/**
* The style applied to the thumb.
*/
thumbStyle?: StyleProp<ViewStyle>
thumbStyle?: ViewStyle;

/**
* Sets an image for the thumb.
Expand All @@ -123,7 +121,7 @@ declare module 'react-native-slider' {
/**
* Used to configure the animation parameters. These are the same parameters in the Animated library.
*/
animationConfig?: SpringAnimationConfig | TimingAnimationConfig
animationConfig?: Animated.SpringAnimationConfig | Animated.TimingAnimationConfig
}

const Slider: ComponentClass<SliderProps>
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
"name": "react-native-slider",
"version": "0.11.0",
"description": "A pure JavaScript <Slider /> component for react-native",
"main": "lib/Slider.js",
"main": "src/Slider.js",
"types": "index.d.ts",
"files": [
"lib",
"src"
"src",
"index.d.ts"
],
"author": "Jean Regisser <[email protected]> (https://github.com/jeanregisser)",
"keywords": [
Expand Down