/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow */ 'use strict'; import type { Float, BubblingEvent, DirectEvent, WithDefault, CodegenNativeComponent, } from '../../Types/CodegenTypes'; import type {ColorValue} from '../../StyleSheet/StyleSheetTypes'; import type {ImageSource} from '../../Image/ImageSource'; import type {ViewProps} from '../View/ViewPropTypes'; const requireNativeComponent = require('../../ReactNative/requireNativeComponent'); type Event = $ReadOnly<{| value: Float, fromUser?: boolean, |}>; type NativeProps = $ReadOnly<{| ...ViewProps, // Props disabled?: ?WithDefault, enabled?: ?WithDefault, maximumTrackImage?: ?ImageSource, maximumTrackTintColor?: ?ColorValue, maximumValue?: ?WithDefault, minimumTrackImage?: ?ImageSource, minimumTrackTintColor?: ?ColorValue, minimumValue?: ?WithDefault, step?: ?WithDefault, testID?: ?WithDefault, thumbImage?: ?ImageSource, thumbTintColor?: ?ColorValue, trackImage?: ?ImageSource, value: ?WithDefault, // Events onChange?: ?(event: BubblingEvent) => void, onValueChange?: ?(event: BubblingEvent) => void, onSlidingComplete?: ?(event: DirectEvent) => void, |}>; type Options = { interfaceOnly: true, isDeprecatedPaperComponentNameRCT: true, }; type SliderType = CodegenNativeComponent<'Slider', NativeProps, Options>; module.exports = ((requireNativeComponent('RCTSlider'): any): SliderType);