mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 19:19:52 +02:00
feat: faster tankopedia
This commit is contained in:
1 parent
0a836826c2
commit
d86af7e7ab
6 files changed
+35
-75
No files matched your search
@@ -1,41 +0,0 @@
|
||||
import { blackA } from '@radix-ui/colors';
|
||||
import { Flex, Spinner, Text } from '@radix-ui/themes';
|
||||
import { theme } from '../stitches.config';
|
||||
|
||||
const NAV_HEIGHT = 52.65;
|
||||
|
||||
interface LoaderProps {
|
||||
naked?: boolean;
|
||||
progress?: number;
|
||||
}
|
||||
|
||||
export function Loader({ naked, progress }: LoaderProps) {
|
||||
const animation = (
|
||||
<Flex align="center" gap="2">
|
||||
<Spinner />
|
||||
{progress !== undefined && (
|
||||
<Text color="gray">{Math.round(progress * 100)}%</Text>
|
||||
)}
|
||||
</Flex>
|
||||
);
|
||||
|
||||
if (naked) return animation;
|
||||
|
||||
return (
|
||||
<Flex
|
||||
style={{
|
||||
backgroundColor: blackA.blackA10,
|
||||
position: 'fixed',
|
||||
top: NAV_HEIGHT,
|
||||
left: 0,
|
||||
width: '100%',
|
||||
height: `calc(100% - ${NAV_HEIGHT}px)`,
|
||||
padding: theme.spaces.paddingMajor,
|
||||
}}
|
||||
align="center"
|
||||
justify="center"
|
||||
>
|
||||
{animation}
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user