import * as React from 'react';
import DocumentationTooltip from '../../../components/common/DocumentationTooltip';
+import SoftwareImpactSeverityIcon from '../../../components/icons/SoftwareImpactSeverityIcon';
import { translate } from '../../../helpers/l10n';
import { SoftwareImpactSeverity } from '../../../types/issues';
import { CommonProps, SimpleListStyleFacet } from './SimpleListStyleFacet';
itemNamePrefix="severity"
listItems={SEVERITIES}
selectedItems={severities}
+ renderIcon={(severity: string) => <SoftwareImpactSeverityIcon severity={severity} />}
help={
<DocumentationTooltip
placement="right"
listItems: Array<T>;
itemNamePrefix: string;
selectedItems: Array<T>;
+ renderIcon?: (item: string) => React.ReactNode;
}
export function SimpleListStyleFacet(props: Props) {
listItems,
itemNamePrefix,
help,
+ renderIcon,
} = props;
const nbSelectableItems = listItems.filter((item) => stats[item]).length;
active={active}
className="it__search-navigator-facet"
key={item}
+ icon={renderIcon?.(item)}
name={translate(itemNamePrefix, item)}
onClick={(itemValue, multiple) => {
if (multiple) {