-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ActivityIndicator component #723
Conversation
import * as React from 'react'; | ||
import { View, StyleSheet } from 'react-native'; | ||
import { Colors, FAB, withTheme, type Theme } from 'react-native-paper'; | ||
import { ActivityIndicator } from '../../src'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we import it from 'react-native-paper' instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
import { withTheme } from '../core/theming'; | ||
import type { Theme } from '../../types'; | ||
|
||
type Props = {| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in future we should add type
prop for Determinate and Indeterminate states, but it shouldn't be breaking change so we can keep that API as it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right but at the moment this component is supposed to be a drop in replacement for the native component. Anyway in the future we could enhance it and just make type
as indeterminate
as default.
e39b266
to
b57af16
Compare
b57af16
to
4408836
Compare
Motivation
This component serves as a drop-in replacement for the component that is delivered by React Native out of the box. It's design tries to imitate the indeterminate circular progress indicator from the Material guidelines:
https://material.io/design/components/progress-indicators.html#circular-progress-indicators
Test plan
Open examples and see examples of
ActivityIndicator
.