website refactor
This commit is contained in:
@@ -2,17 +2,21 @@ import React from 'react';
|
||||
import { Box } from './primitives/Box';
|
||||
import { Text } from './Text';
|
||||
|
||||
interface HorizontalStatItemProps {
|
||||
export interface HorizontalStatItemProps {
|
||||
label: string;
|
||||
value: string | number;
|
||||
color?: string;
|
||||
intent?: 'primary' | 'success' | 'warning' | 'critical' | 'high' | 'med' | 'low';
|
||||
}
|
||||
|
||||
export function HorizontalStatItem({ label, value, color = 'text-white' }: HorizontalStatItemProps) {
|
||||
export const HorizontalStatItem = ({
|
||||
label,
|
||||
value,
|
||||
intent = 'high'
|
||||
}: HorizontalStatItemProps) => {
|
||||
return (
|
||||
<Box display="flex" alignItems="center" justifyContent="between" fullWidth>
|
||||
<Text size="sm" color="text-gray-400">{label}</Text>
|
||||
<Text weight="semibold" color={color}>{value}</Text>
|
||||
<Box display="flex" alignItems="center" justifyContent="between" paddingY={2}>
|
||||
<Text size="sm" variant="low">{label}</Text>
|
||||
<Text weight="semibold" variant={intent}>{value}</Text>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user