website refactor
This commit is contained in:
@@ -5,16 +5,18 @@ export interface MiniStatProps {
|
||||
label: string;
|
||||
value: string | number;
|
||||
intent?: 'primary' | 'success' | 'warning' | 'critical' | 'high' | 'med' | 'low';
|
||||
color?: string;
|
||||
}
|
||||
|
||||
export const MiniStat = ({
|
||||
label,
|
||||
value,
|
||||
intent = 'high'
|
||||
intent = 'high',
|
||||
color
|
||||
}: MiniStatProps) => {
|
||||
return (
|
||||
<Box textAlign="center" padding={2} rounded="lg" bg="var(--ui-color-bg-surface-muted)">
|
||||
<Text size="lg" weight="bold" variant={intent} block>{value}</Text>
|
||||
<Text size="lg" weight="bold" variant={color ? undefined : intent} style={color ? { color } : undefined} block>{value}</Text>
|
||||
<Text size="xs" variant="low" block style={{ fontSize: '10px' }}>{label}</Text>
|
||||
</Box>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user