mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
e52bc2aa73
Summary: This diff uses the generated view config for the slider component � Reviewed By: JoshuaGross, TheSavior, mdvacca Differential Revision: D15336089 fbshipit-source-id: 46c458805fd947e202e2084df65c8c83560cf106
63 lines
1.6 KiB
JavaScript
63 lines
1.6 KiB
JavaScript
/**
|
|
* 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';
|
|
|
|
type Event = $ReadOnly<{|
|
|
value: Float,
|
|
fromUser?: boolean,
|
|
|}>;
|
|
|
|
type NativeProps = $ReadOnly<{|
|
|
...ViewProps,
|
|
|
|
// Props
|
|
disabled?: ?WithDefault<boolean, false>,
|
|
enabled?: ?WithDefault<boolean, false>,
|
|
maximumTrackImage?: ?ImageSource,
|
|
maximumTrackTintColor?: ?ColorValue,
|
|
maximumValue?: ?WithDefault<Float, 1>,
|
|
minimumTrackImage?: ?ImageSource,
|
|
minimumTrackTintColor?: ?ColorValue,
|
|
minimumValue?: ?WithDefault<Float, 0>,
|
|
step?: ?WithDefault<Float, 0>,
|
|
testID?: ?WithDefault<string, ''>,
|
|
thumbImage?: ?ImageSource,
|
|
thumbTintColor?: ?ColorValue,
|
|
trackImage?: ?ImageSource,
|
|
value: ?WithDefault<Float, 0>,
|
|
|
|
// Events
|
|
onChange?: ?(event: BubblingEvent<Event>) => void,
|
|
onValueChange?: ?(event: BubblingEvent<Event>) => void,
|
|
onSlidingComplete?: ?(event: DirectEvent<Event>) => void,
|
|
|}>;
|
|
|
|
type Options = {
|
|
interfaceOnly: true,
|
|
isDeprecatedPaperComponentNameRCT: true,
|
|
};
|
|
|
|
type SliderType = CodegenNativeComponent<'Slider', NativeProps, Options>;
|
|
|
|
module.exports = ((require('SliderNativeViewConfig'): any): SliderType);
|