mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-16 10:26:20 +02:00
25 lines
630 B
TypeScript
25 lines
630 B
TypeScript
import clsx from "clsx";
|
|
import * as React from "react";
|
|
|
|
import Spinner from "./icons/spinner.svg";
|
|
|
|
interface FullPageLoaderProps {
|
|
className?: string;
|
|
children?: React.ReactNode;
|
|
}
|
|
|
|
const FullPageLoader: React.FunctionComponent<FullPageLoaderProps> = ({
|
|
children,
|
|
className,
|
|
}) => {
|
|
return (
|
|
<div className={clsx("flex h-full items-center justify-center", className)}>
|
|
<div className="bg-primary-600 flex items-center rounded-lg px-4 py-3 text-sm text-white shadow-sm">
|
|
<Spinner className="mr-3 h-5 animate-spin" />
|
|
{children}
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default FullPageLoader;
|