Stop flickering + added loader in AddressSelector (#4149)

* Stop UI flickering + added loader to AddressSelector #4103

* PR Grumbles
This commit is contained in:
Nicolas Gotchac
2017-01-13 15:52:24 +01:00
committed by Jaco Greeff
parent f0eab337d8
commit 57ce845e4c
8 changed files with 107 additions and 28 deletions

View File

@@ -21,15 +21,22 @@ import styles from './loading.css';
export default class Loading extends Component {
static propTypes = {
className: PropTypes.string,
size: PropTypes.number
};
static defaultProps = {
className: '',
size: 2
};
render () {
const size = (this.props.size || 2) * 60;
const { className, size } = this.props;
const computedSize = size * 60;
return (
<div className={ styles.loading }>
<CircularProgress size={ size } />
<div className={ [ styles.loading, className ].join(' ') }>
<CircularProgress size={ computedSize } />
</div>
);
}