feat(LoadingIndicator): Implementation for web.

This commit is contained in:
hristoterezov 2018-09-24 19:01:54 -05:00 committed by Любомир Маринов
parent 1928efda11
commit a49e590e7c
3 changed files with 21 additions and 4 deletions

View File

@ -11,7 +11,7 @@ type Props = {
* Prop to set the size of the indicator. This is the same as the
* prop of the native component.
*/
size: 'large' | 'small'
size: 'large' | 'medium' | 'small'
};
/**
@ -27,12 +27,25 @@ export default class LoadingIndicator extends Component<Props> {
* @returns {ReactElement}
*/
render() {
return (
let { size = 'large' } = this.props;
if (size === 'medium') {
size = 'large';
}
const props = {
animating: true,
color: ColorPalette.white,
...this.props,
size
};
return (// $FlowFixMe
<ActivityIndicator
animating = { true }
color = { ColorPalette.white }
size = { this.props.size || 'large' }
{ ...this.props } />
{ ...props }
size = { size } />
);
}
}

View File

@ -0,0 +1,3 @@
/* @flow */
export { default } from '@atlaskit/spinner';

View File

@ -1,4 +1,5 @@
export { default as Container } from './Container';
export { default as LoadingIndicator } from './LoadingIndicator';
export { default as MultiSelectAutocomplete } from './MultiSelectAutocomplete';
export { default as NavigateSectionListEmptyComponent } from
'./NavigateSectionListEmptyComponent';