feat(LoadingIndicator): Implementation for web.
This commit is contained in:
parent
1928efda11
commit
a49e590e7c
|
@ -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 } />
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
/* @flow */
|
||||
|
||||
export { default } from '@atlaskit/spinner';
|
|
@ -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';
|
||||
|
|
Loading…
Reference in New Issue