movie-web/src/components/layout/Loading.tsx
Jelle van Snik 5ddd8638ec Styled Loading and mediacard
Co-authored-by: William Oldham <wegg7250@gmail.com>
2022-02-16 22:38:37 +01:00

23 lines
934 B
TypeScript

export interface LoadingProps {
text?: string;
className?: string;
}
export function Loading(props: LoadingProps) {
return (
<div className={props.className}>
<div className="flex flex-col items-center justify-center py-12">
<div className="flex h-12 items-center justify-center">
<div className="animate-loading-pin bg-denim-300 mx-1 h-2 w-2 rounded-full"></div>
<div className="animate-loading-pin bg-denim-300 mx-1 h-2 w-2 rounded-full [animation-delay:150ms]"></div>
<div className="animate-loading-pin bg-denim-300 mx-1 h-2 w-2 rounded-full [animation-delay:300ms]"></div>
<div className="animate-loading-pin bg-denim-300 mx-1 h-2 w-2 rounded-full [animation-delay:450ms]"></div>
</div>
{props.text && props.text.length ? (
<p className="mt-3 max-w-xs text-sm opacity-75">{props.text}</p>
) : null}
</div>
</div>
);
}