feat: add simple spinner wrapper
This commit is contained in:
parent
5ffedb68d6
commit
01ca81be2a
6
src/components/Spinner/index.tsx
Normal file
6
src/components/Spinner/index.tsx
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import { PropsWithChildren } from 'react'
|
||||||
|
import styles from './style.module.scss'
|
||||||
|
|
||||||
|
export const Spinner = ({ children }: PropsWithChildren) => (
|
||||||
|
<div className={styles.spin}>{children}</div>
|
||||||
|
)
|
12
src/components/Spinner/style.module.scss
Normal file
12
src/components/Spinner/style.module.scss
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
.spin {
|
||||||
|
animation: spin 1s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes spin {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user