website refactor
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Heading } from '@/ui/Heading';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Surface } from '@/ui/Surface';
|
||||
import { Group } from '@/ui/Group';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { ArrowLeft, LucideIcon } from 'lucide-react';
|
||||
import React from 'react';
|
||||
@@ -25,9 +24,9 @@ export function LeaderboardHeaderPanel({
|
||||
children,
|
||||
}: LeaderboardHeaderPanelProps) {
|
||||
return (
|
||||
<Stack mb={8}>
|
||||
<Group direction="column" align="stretch" gap={8}>
|
||||
{onBack && (
|
||||
<Stack mb={6}>
|
||||
<Group>
|
||||
<Button
|
||||
variant="secondary"
|
||||
onClick={onBack}
|
||||
@@ -35,34 +34,29 @@ export function LeaderboardHeaderPanel({
|
||||
>
|
||||
{backLabel}
|
||||
</Button>
|
||||
</Stack>
|
||||
</Group>
|
||||
)}
|
||||
|
||||
<Stack direction="row" align="center" justify="between" gap={4}>
|
||||
<Stack direction="row" align="center" gap={4}>
|
||||
<Group justify="between" gap={4}>
|
||||
<Group gap={4}>
|
||||
{icon && (
|
||||
<Surface
|
||||
variant="muted"
|
||||
rounded="xl"
|
||||
padding={3}
|
||||
bg="linear-gradient(to bottom right, rgba(25, 140, 255, 0.2), rgba(25, 140, 255, 0.05))"
|
||||
border
|
||||
borderColor="border-primary-blue/20"
|
||||
<Group
|
||||
justify="center"
|
||||
>
|
||||
<Icon icon={icon} size={7} color="text-primary-blue" />
|
||||
</Surface>
|
||||
<Icon icon={icon} size={7} intent="primary" />
|
||||
</Group>
|
||||
)}
|
||||
<Stack>
|
||||
<Group direction="column" align="start" gap={1}>
|
||||
<Heading level={1}>{title}</Heading>
|
||||
{description && (
|
||||
<Text color="text-gray-400" block mt={1}>
|
||||
<Text variant="low" block>
|
||||
{description}
|
||||
</Text>
|
||||
)}
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Group>
|
||||
</Group>
|
||||
{children}
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Group>
|
||||
</Group>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user