mirror of
https://github.com/react/react-native.git
synced 2026-09-29 16:58:04 +08:00
Flow type and codegen AndroidProgressBarNativeComponent
Summary: title Reviewed By: rickhanlonii Differential Revision: D15822629 fbshipit-source-id: 2d4181a860ae351c217ca3fb67b1d3bfeb4476e1
This commit is contained in:
committed by
Facebook Github Bot
parent
044176925b
commit
b83a573c7d
@@ -12,7 +12,7 @@
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const ProgressBarAndroidNativeComponent = require('./ProgressBarAndroidNativeComponent');
|
||||
import ProgressBarAndroidNativeComponent from './ProgressBarAndroidNativeComponent';
|
||||
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
|
||||
|
||||
@@ -10,24 +10,23 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const requireNativeComponent = require('../../ReactNative/requireNativeComponent');
|
||||
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
import type {NativeComponent} from '../../Renderer/shims/ReactNative';
|
||||
import type {Float, WithDefault} from '../../Types/CodegenTypes';
|
||||
|
||||
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
|
||||
|
||||
type NativeProps = $ReadOnly<{|
|
||||
...ViewProps,
|
||||
|
||||
//Props
|
||||
styleAttr?: string,
|
||||
typeAttr?: string,
|
||||
indeterminate: boolean,
|
||||
progress?: number,
|
||||
animating?: ?boolean,
|
||||
color?: ?string,
|
||||
testID?: ?string,
|
||||
indeterminate: WithDefault<boolean, true>,
|
||||
progress?: WithDefault<Float, 0>,
|
||||
animating?: ?WithDefault<boolean, true>,
|
||||
color?: ?ColorValue,
|
||||
testID?: ?WithDefault<string, ''>,
|
||||
|}>;
|
||||
|
||||
type ProgressBarAndroidType = Class<NativeComponent<NativeProps>>;
|
||||
|
||||
module.exports = ((requireNativeComponent(
|
||||
'AndroidProgressBar',
|
||||
): any): ProgressBarAndroidType);
|
||||
export default codegenNativeComponent<NativeProps>('AndroidProgressBar');
|
||||
|
||||
Reference in New Issue
Block a user