mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
3f35b7c782
(cherry picked from commit 811eb36c7b1a5124270ff93d18d16944e654de81) Co-authored-by: Mark McDowall <mark@mcdowall.ca> Closes #10764 Closes #10776 Closes #10781
34 lines
825 B
TypeScript
34 lines
825 B
TypeScript
import { FontAwesomeIconProps } from '@fortawesome/react-fontawesome';
|
|
import classNames from 'classnames';
|
|
import React from 'react';
|
|
import Icon, { IconProps } from 'Components/Icon';
|
|
import styles from './LegendIconItem.css';
|
|
|
|
interface LegendIconItemProps extends Pick<IconProps, 'kind'> {
|
|
name: string;
|
|
fullColorEvents: boolean;
|
|
icon: FontAwesomeIconProps['icon'];
|
|
tooltip: string;
|
|
}
|
|
|
|
function LegendIconItem(props: LegendIconItemProps) {
|
|
const { name, fullColorEvents, icon, kind, tooltip } = props;
|
|
|
|
return (
|
|
<div className={styles.legendIconItem} title={tooltip}>
|
|
<Icon
|
|
className={classNames(
|
|
styles.icon,
|
|
fullColorEvents && 'fullColorEvents'
|
|
)}
|
|
name={icon}
|
|
kind={kind}
|
|
/>
|
|
|
|
{name}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default LegendIconItem;
|