PageLoading.tsx 516 B

12345678910111213141516
  1. import { Loader2 } from 'lucide-react';
  2. import { useTranslation } from 'react-i18next';
  3. /** Shown while a page's file loads (#3175). */
  4. export function PageLoading({ fullScreen = false }: { fullScreen?: boolean }) {
  5. const { t } = useTranslation();
  6. return (
  7. <div
  8. role="status"
  9. aria-label={t('common.loading')}
  10. className={`flex items-center justify-center ${fullScreen ? 'min-h-screen' : 'py-24'}`}
  11. >
  12. <Loader2 className="w-8 h-8 animate-spin text-bambu-green" />
  13. </div>
  14. );
  15. }