Add POI feature and imporve the overall backend implementation
This commit is contained in:
26
frontend/src/components/ui/Loader.tsx
Normal file
26
frontend/src/components/ui/Loader.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import React from 'react';
|
||||
import { Loader2 } from 'lucide-react';
|
||||
|
||||
interface LoaderProps {
|
||||
size?: 'sm' | 'md' | 'lg' | 'default';
|
||||
text?: string;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const Loader: React.FC<LoaderProps> = ({ size = 'default', text, className = '' }) => {
|
||||
const sizeClasses = {
|
||||
sm: 'h-4 w-4',
|
||||
md: 'h-6 w-6',
|
||||
lg: 'h-8 w-8',
|
||||
default: 'h-10 w-10',
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={`flex flex-col items-center justify-center ${className}`}>
|
||||
<Loader2 className={`animate-spin text-primary ${sizeClasses[size]}`} />
|
||||
{text && <span className="mt-2 text-sm text-muted-foreground">{text}</span>}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export { Loader };
|
||||
Reference in New Issue
Block a user