UNPKG

2.53 kBTypeScriptView Raw
1/**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 *
7 * @format
8 */
9
10import type * as React from 'react';
11import {Constructor} from '../../../types/private/Utilities';
12import {NativeMethods} from '../../../types/public/ReactNativeTypes';
13import {ColorValue} from '../../StyleSheet/StyleSheet';
14import {ViewProps} from '../View/ViewPropTypes';
15
16/**
17 * ProgressBarAndroid has been extracted from react-native core and will be removed in a future release.
18 * It can now be installed and imported from `@react-native-community/progress-bar-android` instead of 'react-native'.
19 * @see https://github.com/react-native-community/progress-bar-android
20 * @deprecated
21 */
22export interface ProgressBarAndroidProps extends ViewProps {
23 /**
24 * Style of the ProgressBar. One of:
25 Horizontal
26 Normal (default)
27 Small
28 Large
29 Inverse
30 SmallInverse
31 LargeInverse
32 */
33 styleAttr?:
34 | 'Horizontal'
35 | 'Normal'
36 | 'Small'
37 | 'Large'
38 | 'Inverse'
39 | 'SmallInverse'
40 | 'LargeInverse'
41 | undefined;
42
43 /**
44 * If the progress bar will show indeterminate progress.
45 * Note that this can only be false if styleAttr is Horizontal.
46 */
47 indeterminate?: boolean | undefined;
48
49 /**
50 * The progress value (between 0 and 1).
51 */
52 progress?: number | undefined;
53
54 /**
55 * Whether to show the ProgressBar (true, the default) or hide it (false).
56 */
57 animating?: boolean | undefined;
58
59 /**
60 * Color of the progress bar.
61 */
62 color?: ColorValue | undefined;
63
64 /**
65 * Used to locate this view in end-to-end tests.
66 */
67 testID?: string | undefined;
68}
69
70/**
71 * React component that wraps the Android-only `ProgressBar`. This component is used to indicate
72 * that the app is loading or there is some activity in the app.
73 */
74declare class ProgressBarAndroidComponent extends React.Component<ProgressBarAndroidProps> {}
75declare const ProgressBarAndroidBase: Constructor<NativeMethods> &
76 typeof ProgressBarAndroidComponent;
77/**
78 * ProgressBarAndroid has been extracted from react-native core and will be removed in a future release.
79 * It can now be installed and imported from `@react-native-community/progress-bar-android` instead of 'react-native'.
80 * @see https://github.com/react-native-progress-view/progress-bar-android
81 * @deprecated
82 */
83export class ProgressBarAndroid extends ProgressBarAndroidBase {}