ConceptPortal-public/rsconcept/frontend/src/components/ui/Loader.tsx

23 lines
525 B
TypeScript
Raw Normal View History

'use client';
2023-07-25 20:27:29 +03:00
import { ThreeDots } from 'react-loader-spinner';
2023-07-15 17:46:19 +03:00
2024-04-01 19:07:20 +03:00
import { useConceptOptions } from '@/context/OptionsContext';
2024-03-20 15:27:32 +03:00
import AnimateFade from '../wrap/AnimateFade';
2024-01-07 03:29:16 +03:00
interface LoaderProps {
2023-12-28 14:04:44 +03:00
size?: number;
}
2024-01-07 03:29:16 +03:00
function Loader({ size = 10 }: LoaderProps) {
2024-04-01 19:07:20 +03:00
const { colors } = useConceptOptions();
2023-07-15 17:46:19 +03:00
return (
2024-01-07 03:29:16 +03:00
<AnimateFade noFadeIn className='flex justify-center'>
<ThreeDots color={colors.bgPrimary} height={size * 10} width={size * 10} radius={size} />
</AnimateFade>
2023-12-28 14:04:44 +03:00
);
}
2024-01-07 03:29:16 +03:00
export default Loader;