2022-02-16 21:38:37 +00:00
|
|
|
export interface LoadingProps {
|
|
|
|
text?: string;
|
|
|
|
className?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function Loading(props: LoadingProps) {
|
2022-02-13 17:49:03 +00:00
|
|
|
return (
|
2022-02-16 21:38:37 +00:00
|
|
|
<div className={props.className}>
|
2022-02-27 23:08:20 +00:00
|
|
|
<div className="flex flex-col items-center justify-center">
|
2022-02-16 21:38:37 +00:00
|
|
|
<div className="flex h-12 items-center justify-center">
|
2023-01-08 14:42:35 +00:00
|
|
|
<div className="mx-1 h-2 w-2 animate-loading-pin rounded-full bg-denim-300" />
|
|
|
|
<div className="mx-1 h-2 w-2 animate-loading-pin rounded-full bg-denim-300 [animation-delay:150ms]" />
|
|
|
|
<div className="mx-1 h-2 w-2 animate-loading-pin rounded-full bg-denim-300 [animation-delay:300ms]" />
|
|
|
|
<div className="mx-1 h-2 w-2 animate-loading-pin rounded-full bg-denim-300 [animation-delay:450ms]" />
|
2022-02-16 21:38:37 +00:00
|
|
|
</div>
|
|
|
|
{props.text && props.text.length ? (
|
|
|
|
<p className="mt-3 max-w-xs text-sm opacity-75">{props.text}</p>
|
|
|
|
) : null}
|
|
|
|
</div>
|
2022-02-13 17:49:03 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|