1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-03-27 17:54:34 -04:00
Files
Radarr/frontend/src/Components/Label.js
nitsua 553b8b1945 Add movie status to the main search page if the movie is already in the db (label on small screen otherwise progress bar under poster)
Fix issues with yellow/grey movie status color not showing up properly
Refactor the getMovieStatus to be more generic
2021-01-11 22:52:48 -05:00

52 lines
1.0 KiB
JavaScript

import classNames from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { kinds, sizes } from 'Helpers/Props';
import styles from './Label.css';
function Label(props) {
const {
className,
kind,
size,
outline,
children,
colorImpairedMode,
...otherProps
} = props;
return (
<span
className={classNames(
className,
styles[kind],
styles[size],
outline && styles.outline,
colorImpairedMode && 'colorImpaired'
)}
{...otherProps}
>
{children}
</span>
);
}
Label.propTypes = {
className: PropTypes.string.isRequired,
kind: PropTypes.oneOf(kinds.all).isRequired,
size: PropTypes.oneOf(sizes.all).isRequired,
outline: PropTypes.bool.isRequired,
children: PropTypes.node.isRequired,
colorImpairedMode: PropTypes.bool
};
Label.defaultProps = {
className: styles.label,
kind: kinds.DEFAULT,
size: sizes.SMALL,
outline: false,
colorImpairedMode: false
};
export default Label;