Created
June 16, 2019 17:50
-
-
Save jsmanifest/531376ce6a8297a2c8e7c6068c52e157 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import MDSpinner from 'react-md-spinner' | |
import cx from 'classnames' | |
const Spinner = ({ | |
children, | |
containerProps, | |
spinnerProps, | |
xs, | |
sm, | |
center, | |
}) => ( | |
<div | |
className={cx('spinner-container', { | |
'flex-center': !!center, | |
})} | |
{...containerProps} | |
> | |
<div> | |
<div> | |
<MDSpinner | |
size={xs ? 15 : sm ? 50 : 100} | |
borderSize={xs ? 1 : 2} | |
{...spinnerProps} | |
/> | |
</div> | |
<h4 | |
className={cx('spinner', { | |
'spinner-xs': !!xs, | |
})} | |
> | |
{children} | |
</h4> | |
</div> | |
</div> | |
) | |
export default Spinner |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment