accounts-frontend/src/components/ui/loader/ComponentLoader.tsx

28 lines
637 B
TypeScript
Raw Normal View History

import React from 'react';
2016-08-14 14:28:14 +05:30
import classNames from 'classnames';
2019-12-07 16:58:52 +05:30
import { Skin } from 'components/ui';
2016-08-14 14:28:14 +05:30
import styles from './componentLoader.scss';
2019-12-07 16:58:52 +05:30
function ComponentLoader({ skin = 'dark' }: { skin?: Skin }) {
return (
<div
className={classNames(
styles.componentLoader,
styles[`${skin}ComponentLoader`],
)}
>
<div className={styles.spins}>
{new Array(5).fill(0).map((_, index) => (
<div
className={classNames(styles.spin, styles[`spin${index}`])}
key={index}
/>
))}
</div>
</div>
);
2016-08-14 14:28:14 +05:30
}
2019-12-07 16:58:52 +05:30
export default ComponentLoader;