mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
21 lines
560 B
TypeScript
21 lines
560 B
TypeScript
import type {RateUnit} from 'sentry/utils/discover/fields';
|
|
import {NumberContainer} from 'sentry/utils/discover/styles';
|
|
import {formatRate} from 'sentry/utils/formatters';
|
|
|
|
type Props = {
|
|
unit: RateUnit;
|
|
containerProps?: React.DetailedHTMLProps<
|
|
React.HTMLAttributes<HTMLDivElement>,
|
|
HTMLDivElement
|
|
>;
|
|
rate?: number;
|
|
};
|
|
|
|
export function ThroughputCell({rate, unit, containerProps}: Props) {
|
|
return (
|
|
<NumberContainer {...containerProps}>
|
|
{rate ? formatRate(rate, unit, {minimumValue: 0.001}) : '--'}
|
|
</NumberContainer>
|
|
);
|
|
}
|