UNPKG

react-native-ui-lib

Version:

<p align="center"> <img src="https://user-images.githubusercontent.com/1780255/105469025-56759000-5ca0-11eb-993d-3568c1fd54f4.png" height="250px" style="display:block"/> </p> <p align="center">UI Toolset & Components Library for React Native</p> <p a

68 lines (67 loc) 1.98 kB
import React, { PureComponent } from 'react'; import { Animated, StyleProp, ViewStyle, LayoutChangeEvent } from 'react-native'; /** * @description: Progress bar * @example:https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/ProgressBarScreen.js */ interface Props { /** * The progress of the bar from 0 to 100 */ progress?: number; /** * FullWidth Ui preset */ fullWidth?: boolean; /** * Override container style */ style?: StyleProp<ViewStyle>; /** * Progress color */ progressColor?: string; /** * Custom element to render on top of the animated progress */ customElement?: JSX.Element; testID?: string; } export declare type ProgressBarProps = Props; interface State { containerWidth?: number; } declare class ProgressBar extends PureComponent<Props, State> { static displayName: string; static defaultProps: Partial<Props>; progressAnimation: Animated.Value; constructor(props: Props); componentDidUpdate(prevProps: Props): void; getContainerWidth: (event: LayoutChangeEvent) => void; animateProgress(toValue?: number): void; getAccessibilityProps(): { accessible: boolean; accessibilityLabel: string; } | undefined; getContainerStyle(): { height: number; borderRadius?: number | undefined; }; getProgressStyle(): { right: number | undefined; backgroundColor: string; borderRadius: number; } | { right: number | undefined; backgroundColor: string; borderBottomRightRadius: number; borderTopRightRadius: number; }; renderCustomElement(): React.FunctionComponentElement<any> | undefined; render(): JSX.Element; } export { ProgressBar }; declare const _default: React.ComponentClass<Props & { useCustomTheme?: boolean | undefined; }, any> & typeof ProgressBar; export default _default;