website refactor
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
'use client';
|
||||
|
||||
import { ReactNode } from 'react';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Group } from '@/ui/Group';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { StatusDot } from '@/ui/StatusDot';
|
||||
|
||||
interface TeamsDirectoryProps {
|
||||
children: ReactNode;
|
||||
@@ -14,32 +14,33 @@ interface TeamsDirectoryProps {
|
||||
|
||||
export function TeamsDirectory({ children, title, subtitle }: TeamsDirectoryProps) {
|
||||
return (
|
||||
<Box as="main" bg="base-black" minHeight="screen">
|
||||
<Container size="lg">
|
||||
<Box paddingY={12}>
|
||||
<Stack gap={10}>
|
||||
{title && (
|
||||
<Stack direction="row" align="center" gap={2} mb={6}>
|
||||
<Box w="2" h="2" bg="primary-accent" />
|
||||
<Text size="xs" weight="bold" color="text-gray-400" uppercase>{title}</Text>
|
||||
</Stack>
|
||||
)}
|
||||
{children}
|
||||
</Stack>
|
||||
</Box>
|
||||
</Container>
|
||||
</Box>
|
||||
<Container size="lg" py={12}>
|
||||
<Group direction="column" gap={10} fullWidth>
|
||||
{title && (
|
||||
<Group direction="row" align="center" gap={2}>
|
||||
<StatusDot intent="primary" size="md" />
|
||||
<Text size="xs" weight="bold" variant="low" uppercase>{title}</Text>
|
||||
</Group>
|
||||
)}
|
||||
{children}
|
||||
</Group>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
||||
export function TeamsDirectorySection({ children, title, accentColor = "primary-accent" }: { children: ReactNode, title: string, accentColor?: string }) {
|
||||
const intentMap: Record<string, 'primary' | 'success' | 'warning' | 'critical' | 'telemetry'> = {
|
||||
'primary-accent': 'primary',
|
||||
'telemetry-aqua': 'telemetry',
|
||||
};
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Stack direction="row" align="center" gap={2} mb={6}>
|
||||
<Box w="2" h="2" bg={accentColor} />
|
||||
<Text size="xs" weight="bold" color="text-gray-400" uppercase>{title}</Text>
|
||||
</Stack>
|
||||
<Group direction="column" gap={6} fullWidth>
|
||||
<Group direction="row" align="center" gap={2}>
|
||||
<StatusDot intent={intentMap[accentColor] || 'primary'} size="md" />
|
||||
<Text size="xs" weight="bold" variant="low" uppercase>{title}</Text>
|
||||
</Group>
|
||||
{children}
|
||||
</Box>
|
||||
</Group>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user