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