mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-10 02:55:41 +00:00
0d5d0cea9a
* Add disclaimer modal to footer * Remove duplicate code & unnecessary styles * Fix formatting noise * remove un-used css style * Fix tslint error & add media query for modals * Nest Media Query * Replace '???' with Spinner & update spinner * Add loading states for wallet balances * Update wallet test * Remove excess data passed to wallet balance reducer & Fix wallet balance types * Merge 'develop' into 'loading-indicator' * Add 'light' prop to Spinner * Only show spinners when fetching data * Remove format diff * Apply naming conventions * Remove network name when offline
28 lines
559 B
TypeScript
28 lines
559 B
TypeScript
import React from 'react';
|
|
import './Spinner.scss';
|
|
|
|
type Size = 'x1' | 'x2' | 'x3' | 'x4' | 'x5';
|
|
|
|
interface SpinnerProps {
|
|
size?: Size;
|
|
light?: boolean;
|
|
}
|
|
|
|
const Spinner = ({ size = 'x1', light = false }: SpinnerProps) => {
|
|
const color = light ? 'Spinner-light' : 'Spinner-dark';
|
|
return (
|
|
<svg className={`Spinner Spinner-${size} ${color}`} viewBox="0 0 50 50">
|
|
<circle
|
|
className="path"
|
|
cx="25"
|
|
cy="25"
|
|
r="20"
|
|
fill="none"
|
|
strokeWidth="5"
|
|
/>
|
|
</svg>
|
|
);
|
|
};
|
|
|
|
export default Spinner;
|