2017-11-20 01:47:23 +05:30
|
|
|
// @flow
|
|
|
|
import type { Skin } from 'components/ui';
|
2017-08-23 00:19:50 +05:30
|
|
|
import React from 'react';
|
2016-08-14 14:28:14 +05:30
|
|
|
import classNames from 'classnames';
|
|
|
|
|
|
|
|
import styles from './componentLoader.scss';
|
|
|
|
|
2019-11-27 14:33:32 +05:30
|
|
|
export default function ComponentLoader({ skin }: { 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
|
|
|
}
|
|
|
|
|
|
|
|
ComponentLoader.defaultProps = {
|
2019-11-27 14:33:32 +05:30
|
|
|
skin: 'dark',
|
2016-08-14 14:28:14 +05:30
|
|
|
};
|