import React from 'react'; import {Divider, Text} from '@gravity-ui/uikit'; import identity from 'lodash/identity'; import {SegmentedProgress} from '../../../../../components/SegmentedProgress/SegmentedProgress'; import {cn} from '../../../../../utils/cn'; import i18n from '../i18n'; import './MetricPageSummary.scss'; const b = cn('ydb-tenant-metric-page-summary'); type MetricPageSummaryProgressTheme = 'neutral' | 'success' | 'warning' | 'danger'; interface MetricPageSummaryProps { className?: string; dataQa: string; description: string; legend?: string; percentText: string; progressTheme: MetricPageSummaryProgressTheme; progressValue: number; } export function MetricPageSummary({ className, dataQa, description, legend, percentText, progressTheme, progressValue, }: MetricPageSummaryProps) { const hasLegend = legend !== undefined; return (
{description}
{i18n('context_metric-summary-used', {value: percentText})} {hasLegend && ( {legend} )}
); }