Portal/rsconcept/frontend/src/components/ui/ValueStats.tsx

25 lines
585 B
TypeScript
Raw Normal View History

2024-08-23 12:35:05 +03:00
import { PARAMETER } from '@/utils/constants';
import { CProps } from '../props';
import ValueIcon from './ValueIcon';
interface ValueStatsProps extends CProps.Styling, CProps.Titled {
/** Id of the component. */
2024-08-23 12:35:05 +03:00
id: string;
/** Icon to display. */
2024-08-23 12:35:05 +03:00
icon: React.ReactNode;
/** Value to display. */
2024-08-23 12:35:05 +03:00
value: string | number;
}
/**
* Displays statistics value with an icon.
*/
2024-08-23 12:35:05 +03:00
function ValueStats(props: ValueStatsProps) {
return <ValueIcon dense smallThreshold={PARAMETER.statSmallThreshold} textClassName='min-w-[1.4rem]' {...props} />;
}
export default ValueStats;