openreplay/frontend/app/components/Dashboard/Widgets/common/AvgLabel.js
Andrey Babushkin fd5c0c9747
Add lokalisation (#3092)
* applied eslint

* add locales and lint the project

* removed error boundary

* updated locales

* fix min files

* fix locales
2025-03-06 17:43:15 +01:00

16 lines
468 B
JavaScript

import React from 'react';
import { numberWithCommas } from 'App/utils';
function AvgLabel({ className = '', text, count, unit }) {
return (
<div className={className}>
<span className="text-sm color-gray-medium">{text}</span>
<span className="text-2xl ml-1 font-medium">
{count ? numberWithCommas(Math.round(count)) : 0}
</span>
{unit && <span className="font-lg ml-1">{unit}</span>}
</div>
);
}
export default AvgLabel;