23 lines
608 B
TypeScript
23 lines
608 B
TypeScript
import React from 'react';
|
|
import { Box } from './primitives/Box';
|
|
import { Text } from './Text';
|
|
|
|
export interface HorizontalStatItemProps {
|
|
label: string;
|
|
value: string | number;
|
|
intent?: 'primary' | 'success' | 'warning' | 'critical' | 'high' | 'med' | 'low';
|
|
}
|
|
|
|
export const HorizontalStatItem = ({
|
|
label,
|
|
value,
|
|
intent = 'high'
|
|
}: HorizontalStatItemProps) => {
|
|
return (
|
|
<Box display="flex" alignItems="center" justifyContent="between" paddingY={2}>
|
|
<Text size="sm" variant="low">{label}</Text>
|
|
<Text weight="semibold" variant={intent}>{value}</Text>
|
|
</Box>
|
|
);
|
|
};
|