Skip to content
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

Merged
merged 2 commits into from
Feb 4, 2019
Merged

Conversation

jaulz
Copy link
Collaborator

@jaulz jaulz commented Jan 8, 2019

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.

@callstack-bot
Copy link

callstack-bot commented Jan 9, 2019

Hey @jaulz, thank you for your pull request 🤗. The documentation from this branch can be viewed here. Please remember to update Typescript types if you changed API.

@ferrannp ferrannp requested review from Trancever and removed request for satya164 January 31, 2019 11:31
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';
Copy link
Contributor

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?

Copy link
Collaborator Author

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 = {|
Copy link
Contributor

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.

Copy link
Collaborator Author

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.

@Trancever Trancever merged commit fb6762e into master Feb 4, 2019
@Trancever Trancever deleted the feat/activity-indicator branch February 4, 2019 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants