improve loading states:
* app loader * specific loaders with spinner
This commit is contained in:
15
app/core/components/spinner.module.css
Normal file
15
app/core/components/spinner.module.css
Normal file
@ -0,0 +1,15 @@
|
||||
.ring {
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border: 3px solid rgba(0, 0, 0, 0.15);
|
||||
border-radius: 50%;
|
||||
border-top-color: currentColor;
|
||||
animation: spin 1s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
11
app/core/components/spinner.tsx
Normal file
11
app/core/components/spinner.tsx
Normal file
@ -0,0 +1,11 @@
|
||||
import clsx from "clsx";
|
||||
|
||||
import styles from "./spinner.module.css";
|
||||
|
||||
export default function Spinner() {
|
||||
return (
|
||||
<div className="h-full flex">
|
||||
<div className={clsx(styles.ring, "m-auto text-primary-400")} />
|
||||
</div>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user