Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion Libraries/Components/ActivityIndicator/ActivityIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ const ActivityIndicator = React.createClass({
*/
color: ColorPropType,
/**
* Size of the indicator. Small has a height of 20, large has a height of 36.
* Size of the indicator. Small has a height of 20, medium has a height of 28, large has a height of 36, extralarge has a height of 50.
* Other sizes can be obtained using a scale transform.
*/
size: PropTypes.oneOf([
'small',
'medium',
'large',
'extralarge'
]),
/**
* Whether the indicator should hide when not animating (true by default).
Expand All @@ -71,9 +73,15 @@ const ActivityIndicator = React.createClass({
case 'small':
sizeStyle = styles.sizeSmall;
break;
case 'medium':
sizeStyle = styles.sizeMedium;
break;
case 'large':
sizeStyle = styles.sizeLarge;
break;
case 'extralarge':
sizeStyle = styles.sizeExtraLarge;
break;
}
return (
<View
Expand All @@ -99,10 +107,18 @@ const styles = StyleSheet.create({
width: 20,
height: 20,
},
sizeMedium: {
width: 28,
height: 28,
},
sizeLarge: {
width: 36,
height: 36,
},
sizeExtraLarge: {
width: 50,
height: 50,
},
});

if (Platform.OS === 'ios') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ var ActivityIndicatorIOS = React.createClass({
*/
size: PropTypes.oneOf([
'small',
'medium',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed I think since this component is deprecated?

'large',
'extralarge',
]),
/**
* Invoked on mount and layout changes with
Expand Down