18 lines
1012 B
TypeScript
18 lines
1012 B
TypeScript
import { Text } from '~/components/ui/text';
|
|
import { LOADER_ILLUSTRATION } from '~/data/brand';
|
|
|
|
// Full-screen loading state: the AR illustration, an indeterminate bar and a label. Still with reduced motion.
|
|
export function LoadingScreen({ label = 'Loading…' }: { label?: string }) {
|
|
return (
|
|
<div role='status' className='fixed inset-0 flex flex-col items-center justify-center gap-7 bg-background px-6'>
|
|
<img {...LOADER_ILLUSTRATION} alt='' className='h-auto w-full max-w-[400px] animate-float motion-reduce:animate-none' />
|
|
<div className='flex w-40 flex-col items-center gap-3'>
|
|
<span aria-hidden='true' className='relative h-0.5 w-full overflow-hidden rounded-full bg-border-divider'>
|
|
<span className='absolute inset-y-0 left-0 w-1/3 animate-loading-bar rounded-full bg-primary motion-reduce:animate-none' />
|
|
</span>
|
|
<Text variant='eyebrow'>{label}</Text>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|