1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-18 21:35:51 -04:00
Files
Radarr/frontend/src/Calendar/Legend/LegendItem.tsx
T
Bogdan 3f35b7c782 Convert Calendar to TypeScript
(cherry picked from commit 811eb36c7b1a5124270ff93d18d16944e654de81)

Co-authored-by: Mark McDowall <mark@mcdowall.ca>

Closes #10764
Closes #10776
Closes #10781
2025-05-29 17:14:07 +03:00

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;