mattermost-mobile/types/modules/react-native-slider.d.ts
Elias Nahum dbd7bc8a51
Gallery Improvements (#4837)
* Open/Close Gallery transitions

* Include postId in file info & disable opening the gallery in some cases

* Add progress bar component

* Transition to gallery based on platform

* Improve getting the filename for non attachments

* Patch RNFetchBlob TS definition

* Add gallery types

* fix unit tests for message and post attachment

* add getLocalPath method

* Add react-native-share dependency

* Re-style gallery footer

* Refactor Gallery screen

* Double tap zoom in/out and translate

* Make android activity "transparent"

* Do not animate to height on dismissing gallery

* Open gallery for file uploads

* Fix borderRadius for gallery action button

* Use progress bar for file uploads

* Replace progress bar for file attachment document

* Upgrade RNN to 7.1.0 to fix share elements transitions

* Fix Gallery unit tests

* translate down when popping screen on iOS

* Swipe, Pan & Tap fixes

* fix gallery footer avatar eslint

* Fix gallery snapshot tests

* Use CompassIcon in Gallery

* Feedback from UX review

* Fix gallery UI for other file types

* Set other file type gallery button to 48pt
2020-11-06 21:17:27 -03:00

134 lines
No EOL
3.5 KiB
TypeScript

/* eslint-disable header/header */
declare module 'react-native-slider' {
import {ComponentClass, PureComponent} from 'react';
import {
ImageSourcePropType,
SpringAnimationConfig,
StyleProp,
TimingAnimationConfig,
ViewStyle,
} from 'react-native';
interface SliderProps {
/**
* Initial value of the slider. The value should be between minimumValue
* and maximumValue, which default to 0 and 1 respectively.
* Default value is 0.
*
* *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
/**
* If true the user won't be able to move the slider.
* Default value is false.
*/
disabled?: boolean
/**
* Initial minimum value of the slider. Default value is 0.
*/
minimumValue?: number
/**
* Initial maximum value of the slider. Default value is 1.
*/
maximumValue?: number
/**
* Step value of the slider. The value should be between 0 and
* (maximumValue - minimumValue). Default value is 0.
*/
step?: number
/**
* The color used for the track to the left of the button. Overrides the
* default blue gradient image.
*/
minimumTrackTintColor?: string
/**
* The color used for the track to the right of the button. Overrides the
* default blue gradient image.
*/
maximumTrackTintColor?: string
/**
* The color used for the thumb.
*/
thumbTintColor?: string
/**
* The size of the touch area that allows moving the thumb.
* The touch area has the same center has the visible thumb.
* This allows to have a visually small thumb while still allowing the user
* to move it easily.
* The default is {width: 40, height: 40}.
*/
thumbTouchSize?: { width: number; height: number }
/**
* Callback continuously called while the user is dragging the slider.
*/
onValueChange: (value: number) => void
/**
* Callback called when the user starts changing the value (e.g. when
* the slider is pressed).
*/
onSlidingStart?: (value: number) => void
/**
* Callback called when the user finishes changing the value (e.g. when
* the slider is released).
*/
onSlidingComplete?: (value: number) => void
/**
* The style applied to the slider container.
*/
style?: StyleProp<ViewStyle>
/**
* The style applied to the track.
*/
trackStyle?: StyleProp<ViewStyle>
/**
* The style applied to the thumb.
*/
thumbStyle?: StyleProp<ViewStyle>
/**
* Sets an image for the thumb.
*/
thumbImage?: ImageSourcePropType
/**
* Set this to true to visually see the thumb touch rect in green.
*/
debugTouchArea?: boolean
/**
* Set to true to animate values with default 'timing' animation type
*/
animateTransitions?: boolean
/**
* Custom Animation type. 'spring' or 'timing'.
*/
animationType?: 'spring' | 'timing'
/**
* Used to configure the animation parameters. These are the same parameters in the Animated library.
*/
animationConfig?: SpringAnimationConfig | TimingAnimationConfig
}
const Slider: ComponentClass<SliderProps>;
export default Slider;
}