/** * 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, } from '../../Types/CodegenTypes'; import codegenNativeComponent from '../../Utilities/codegenNativeComponent'; import type {ColorValue} from '../../StyleSheet/StyleSheetTypes'; import type {ImageSource} from '../../Image/ImageSource'; import type {ViewProps} from '../View/ViewPropTypes'; 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, |}>; export default codegenNativeComponent('Slider', { interfaceOnly: true, paperComponentName: 'RCTSlider', });