yeet
This commit is contained in:
104
node_modules/react-native/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js
generated
vendored
Normal file
104
node_modules/react-native/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js
generated
vendored
Normal file
@ -0,0 +1,104 @@
|
||||
/**
|
||||
* 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';
|
||||
|
||||
const React = require('react');
|
||||
|
||||
import ProgressBarAndroidNativeComponent from './ProgressBarAndroidNativeComponent';
|
||||
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
|
||||
export type ProgressBarAndroidProps = $ReadOnly<{|
|
||||
...ViewProps,
|
||||
|
||||
/**
|
||||
* Style of the ProgressBar and whether it shows indeterminate progress (e.g. spinner).
|
||||
*
|
||||
* `indeterminate` can only be false if `styleAttr` is Horizontal, and requires a
|
||||
* `progress` value.
|
||||
*/
|
||||
...
|
||||
| {|
|
||||
styleAttr: 'Horizontal',
|
||||
indeterminate: false,
|
||||
progress: number,
|
||||
|}
|
||||
| {|
|
||||
typeAttr:
|
||||
| 'Horizontal'
|
||||
| 'Normal'
|
||||
| 'Small'
|
||||
| 'Large'
|
||||
| 'Inverse'
|
||||
| 'SmallInverse'
|
||||
| 'LargeInverse',
|
||||
indeterminate: true,
|
||||
|},
|
||||
/**
|
||||
* Whether to show the ProgressBar (true, the default) or hide it (false).
|
||||
*/
|
||||
animating?: ?boolean,
|
||||
/**
|
||||
* Color of the progress bar.
|
||||
*/
|
||||
color?: ?ColorValue,
|
||||
/**
|
||||
* Used to locate this view in end-to-end tests.
|
||||
*/
|
||||
testID?: ?string,
|
||||
|}>;
|
||||
|
||||
/**
|
||||
* React component that wraps the Android-only `ProgressBar`. This component is
|
||||
* used to indicate that the app is loading or there is activity in the app.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* ```
|
||||
* render: function() {
|
||||
* var progressBar =
|
||||
* <View style={styles.container}>
|
||||
* <ProgressBar styleAttr="Inverse" />
|
||||
* </View>;
|
||||
|
||||
* return (
|
||||
* <MyLoadingComponent
|
||||
* componentView={componentView}
|
||||
* loadingView={progressBar}
|
||||
* style={styles.loadingComponent}
|
||||
* />
|
||||
* );
|
||||
* },
|
||||
* ```
|
||||
*/
|
||||
const ProgressBarAndroid = (
|
||||
props: ProgressBarAndroidProps,
|
||||
forwardedRef: ?React.Ref<typeof ProgressBarAndroidNativeComponent>,
|
||||
) => {
|
||||
return <ProgressBarAndroidNativeComponent {...props} ref={forwardedRef} />;
|
||||
};
|
||||
|
||||
const ProgressBarAndroidToExport = React.forwardRef(ProgressBarAndroid);
|
||||
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
ProgressBarAndroidToExport.defaultProps = {
|
||||
styleAttr: 'Normal',
|
||||
indeterminate: true,
|
||||
animating: true,
|
||||
};
|
||||
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
module.exports = (ProgressBarAndroidToExport: typeof ProgressBarAndroidNativeComponent);
|
12
node_modules/react-native/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.ios.js
generated
vendored
Normal file
12
node_modules/react-native/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.ios.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../UnimplementedViews/UnimplementedView');
|
35
node_modules/react-native/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js
generated
vendored
Normal file
35
node_modules/react-native/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
/**
|
||||
* 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 type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
import type {Double, WithDefault} from '../../Types/CodegenTypes';
|
||||
|
||||
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
|
||||
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
|
||||
|
||||
type NativeProps = $ReadOnly<{|
|
||||
...ViewProps,
|
||||
|
||||
//Props
|
||||
styleAttr?: string,
|
||||
typeAttr?: string,
|
||||
indeterminate: boolean,
|
||||
progress?: WithDefault<Double, 0>,
|
||||
animating?: WithDefault<boolean, true>,
|
||||
color?: ?ColorValue,
|
||||
testID?: WithDefault<string, ''>,
|
||||
|}>;
|
||||
|
||||
export default (codegenNativeComponent<NativeProps>(
|
||||
'AndroidProgressBar',
|
||||
): HostComponent<NativeProps>);
|
Reference in New Issue
Block a user