You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
943 B
49 lines
943 B
7 years ago
|
import PropTypes from 'prop-types';
|
||
|
import React from 'react';
|
||
|
import styles from './LoadingIndicator.css';
|
||
|
|
||
|
function LoadingIndicator({ className, size }) {
|
||
|
const sizeInPx = `${size}px`;
|
||
|
const width = sizeInPx;
|
||
|
const height = sizeInPx;
|
||
|
|
||
|
return (
|
||
|
<div
|
||
|
className={className}
|
||
|
style={{ height }}
|
||
|
>
|
||
|
<div
|
||
|
className={styles.rippleContainer}
|
||
|
style={{ width, height }}
|
||
|
>
|
||
|
<div
|
||
|
className={styles.ripple}
|
||
|
style={{ width, height }}
|
||
|
/>
|
||
|
|
||
|
<div
|
||
|
className={styles.ripple}
|
||
|
style={{ width, height }}
|
||
|
/>
|
||
|
|
||
|
<div
|
||
|
className={styles.ripple}
|
||
|
style={{ width, height }}
|
||
|
/>
|
||
|
</div>
|
||
|
</div>
|
||
|
);
|
||
|
}
|
||
|
|
||
|
LoadingIndicator.propTypes = {
|
||
|
className: PropTypes.string,
|
||
|
size: PropTypes.number
|
||
|
};
|
||
|
|
||
|
LoadingIndicator.defaultProps = {
|
||
|
className: styles.loading,
|
||
|
size: 50
|
||
|
};
|
||
|
|
||
|
export default LoadingIndicator;
|