import {Ban, Wrench} from '@gravity-ui/icons'; import type {IconData, LabelProps} from '@gravity-ui/uikit'; import {Flex, Icon, Label, Text} from '@gravity-ui/uikit'; import {b} from '../constants'; import i18n from '../i18n'; interface PDiskMaintenanceLegendProps { className?: string; } interface PDiskMaintenanceLegendItem { text: string; theme: LabelProps['theme']; icon?: IconData; } const iconSize = 12; const legendItems: PDiskMaintenanceLegendItem[] = [ { text: i18n('value_maintenance-long-term-planned'), theme: 'danger', icon: Wrench, }, { text: i18n('value_maintenance-no-new-vdisks'), theme: 'warning', icon: Ban, }, {text: i18n('value_maintenance-no-request'), theme: 'success'}, {text: i18n('value_no-data'), theme: 'unknown'}, ]; export function PDiskMaintenanceLegend({className}: PDiskMaintenanceLegendProps) { return ( {legendItems.map(({text, theme, icon}) => ( ))} {i18n('context_no-statistics')} ); }