1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-25 22:37:27 -04:00
Files
Radarr/frontend/src/Calendar/Legend/LegendItem.js
T
bakerboy448 0366029269 Fixed: Legend and Colors on calendar
Fixed: Streamline Legend in Index and Calendar
Fixed: Broken Translations
2020-11-26 08:16:44 -05:00

36 lines
796 B
JavaScript

import classNames from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import styles from './LegendItem.css';
function LegendItem(props) {
const {
name,
style,
colorImpairedMode
} = props;
return (
<div className={styles.legendItemContainer}>
<div
className={classNames(
styles.legendItem,
styles[style],
colorImpairedMode && 'colorImpaired'
)}
/>
<div className={classNames(styles.legendItemText, colorImpairedMode && styles[`${style}ColorImpaired`])}>
{name}
</div>
</div>
);
}
LegendItem.propTypes = {
name: PropTypes.string.isRequired,
style: PropTypes.string.isRequired,
colorImpairedMode: PropTypes.bool.isRequired
};
export default LegendItem;