mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
40625ceabf
Summary: Reverting the generated view configs due to a potential issue Reviewed By: mdvacca Differential Revision: D15539319 fbshipit-source-id: bddf923dcfda18bd074196f06610fea8bb4561b4
65 lines
1.7 KiB
JavaScript
65 lines
1.7 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';
|
|
|
|
const requireNativeComponent = require('../../ReactNative/requireNativeComponent');
|
|
|
|
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 = ((requireNativeComponent('RCTSlider'): any): SliderType);
|