Skip to content

Instantly share code, notes, and snippets.

@jsmanifest
Created June 16, 2019 17:50
Show Gist options
  • Save jsmanifest/531376ce6a8297a2c8e7c6068c52e157 to your computer and use it in GitHub Desktop.
Save jsmanifest/531376ce6a8297a2c8e7c6068c52e157 to your computer and use it in GitHub Desktop.
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