diff --git a/components/loader/FullLoader.js b/components/loader/FullLoader.js deleted file mode 100644 index 92b786812..000000000 --- a/components/loader/FullLoader.js +++ /dev/null @@ -1,42 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; - -import { classnames } from '../../helpers/component'; - -const FullLoader = ({ size = 50, color, className }) => { - const smaller = size < 50; - return ( - - ); -}; - -FullLoader.propTypes = { - size: PropTypes.number, - color: PropTypes.string, - className: PropTypes.string -}; - -export default FullLoader; diff --git a/components/loader/FullLoader.tsx b/components/loader/FullLoader.tsx new file mode 100644 index 000000000..67c13dc7a --- /dev/null +++ b/components/loader/FullLoader.tsx @@ -0,0 +1,57 @@ +import React from 'react'; +import { c } from 'ttag'; + +import { classnames } from '../../helpers/component'; + +interface Props { + size?: number; + color?: string; + className?: string; +} +const FullLoader = ({ size = 50, color, className }: Props) => { + const isSmall = size < 50; + + const diameter = isSmall ? 10 : 100; + const radius = isSmall ? 8 : 80; + const viewBox = isSmall ? '0 0 20 20' : '0 0 200 200'; + + return ( + <> + + {c('Info').t`Loading`} + > + ); +}; + +export default FullLoader; diff --git a/components/loader/Loader.tsx b/components/loader/Loader.tsx index d7e3bda13..b641466e7 100644 --- a/components/loader/Loader.tsx +++ b/components/loader/Loader.tsx @@ -1,31 +1,21 @@ import React from 'react'; -import { c } from 'ttag'; -import loadingSvg from 'design-system/assets/img/shared/loading-atom.svg'; -import loadingSmallerSvg from 'design-system/assets/img/shared/loading-atom-smaller.svg'; +import FullLoader from './FullLoader'; -const IMAGES = { - small: loadingSmallerSvg, - medium: loadingSvg, - big: loadingSvg +const SIZE = { + small: 20, + medium: 80, + big: 200 }; -const MEDIUM_WIDTH = '80'; -const MEDIUM_HEIGHT = '80'; - interface Props { size?: 'small' | 'medium' | 'big'; + color?: string; } -const Loader = ({ size = 'small' }: Props) => { +const Loader = ({ size = 'small', color = '' }: Props) => { return (