-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.tsx
More file actions
41 lines (34 loc) · 962 Bytes
/
index.tsx
File metadata and controls
41 lines (34 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import React from 'react';
import { _cs } from '@togglecorp/fujs';
import { UiMode } from '../ThemeContext';
import { useThemeClassName } from '../../hooks';
import styles from './styles.css';
export interface LoadingAnimationProps {
className?: string;
uiMode?: UiMode;
compact?: boolean;
}
function LoadingAnimation(props: LoadingAnimationProps) {
const {
className,
uiMode,
compact,
} = props;
const themeClassName = useThemeClassName(uiMode, styles.light, styles.dark);
return (
<div className={
_cs(
className,
themeClassName,
styles.loadingAnimation,
compact && styles.compact,
)
}
>
<div className={styles.particle} />
<div className={styles.particle} />
<div className={styles.particle} />
</div>
);
}
export default LoadingAnimation;