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
36 lines
705 B
TypeScript
36 lines
705 B
TypeScript
import classNames from 'classnames';
|
|
import React from 'react';
|
|
import { CalendarStatus } from 'typings/Calendar';
|
|
import styles from './LegendItem.css';
|
|
|
|
interface LegendItemProps {
|
|
name: string;
|
|
status: CalendarStatus;
|
|
isAgendaView: boolean;
|
|
fullColorEvents: boolean;
|
|
colorImpairedMode: boolean;
|
|
}
|
|
|
|
function LegendItem({
|
|
name,
|
|
status,
|
|
isAgendaView,
|
|
fullColorEvents,
|
|
colorImpairedMode,
|
|
}: LegendItemProps) {
|
|
return (
|
|
<div
|
|
className={classNames(
|
|
styles.legendItem,
|
|
styles[status],
|
|
colorImpairedMode && 'colorImpaired',
|
|
fullColorEvents && !isAgendaView && 'fullColor'
|
|
)}
|
|
>
|
|
{name}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default LegendItem;
|