mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-02 22:14:43 +01:00
16 lines
445 B
JavaScript
16 lines
445 B
JavaScript
import { Loading } from 'react-basics';
|
|
import ErrorMessage from 'components/common/ErrorMessage';
|
|
import styles from './MetricsBar.module.css';
|
|
|
|
export function MetricsBar({ children, onClick, isLoading, isFetched, error }) {
|
|
return (
|
|
<div className={styles.bar} onClick={onClick}>
|
|
{isLoading && !isFetched && <Loading icon="dots" />}
|
|
{error && <ErrorMessage />}
|
|
{children}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default MetricsBar;
|