Files
react-native/Libraries/Components/Picker/RCTPickerViewConfig.js
T
Tim Yung e136aa3fc4 RN: Cleanup ViewConfig Types
Summary:
Cleans up the Flow types for React Native ViewConfig. After this diff, we will have two new canonical types:

- `ViewConfig` which is what we get from native and what is registered in the `ReactNativeViewConfigRegistry`.
- `PartialViewConfig` which is what we generate statically and augment at runtime before registering with the `ReactNativeViewConfigRegistry`.

Changelog:
[Internal]

Reviewed By: JoshuaGross

Differential Revision: D25075299

fbshipit-source-id: 4b53927b2db437b615447b711e83db355d0cfa55
2020-11-18 21:19:12 -08:00

42 lines
1013 B
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.
*
* @flow strict-local
* @format
*/
'use strict';
import ReactNativeViewViewConfig from '../../Components/View/ReactNativeViewViewConfig';
import {type ViewConfig} from '../../Renderer/shims/ReactNativeTypes';
const RCTPickerViewConfig = {
uiViewClassName: 'RCTPicker',
bubblingEventTypes: {
topChange: {
phasedRegistrationNames: {
bubbled: 'onChange',
captured: 'onChangeCapture',
},
},
},
directEventTypes: {},
validAttributes: {
...ReactNativeViewViewConfig.validAttributes,
color: {process: require('../../StyleSheet/processColor')},
fontFamily: true,
fontSize: true,
fontStyle: true,
fontWeight: true,
items: true,
onChange: true,
selectedIndex: true,
textAlign: true,
},
};
module.exports = (RCTPickerViewConfig: ViewConfig);