2019-06-29 23:14:32 +00:00
|
|
|
import React from 'react';
|
|
|
|
import classNames from 'classnames';
|
|
|
|
|
2019-08-17 23:03:10 +00:00
|
|
|
export type SpinnerSize = 'large' | 'normal' | 'tiny';
|
|
|
|
|
|
|
|
export default ({ size, centered }: { size?: SpinnerSize; centered?: boolean }) => (
|
2019-07-10 05:00:29 +00:00
|
|
|
centered ?
|
2019-08-17 23:03:10 +00:00
|
|
|
<div className={classNames('flex justify-center', { 'm-20': size === 'large', 'm-6': size !== 'large' })}>
|
|
|
|
<div className={classNames('spinner-circle spinner-white', {
|
|
|
|
'spinner-lg': size === 'large',
|
|
|
|
'spinner-sm': size === 'tiny',
|
|
|
|
})}/>
|
2019-07-10 05:00:29 +00:00
|
|
|
</div>
|
|
|
|
:
|
2019-08-17 23:03:10 +00:00
|
|
|
<div className={classNames('spinner-circle spinner-white', {
|
|
|
|
'spinner-lg': size === 'large',
|
|
|
|
'spinner-sm': size === 'tiny',
|
|
|
|
})}/>
|
2019-06-29 23:14:32 +00:00
|
|
|
);
|