Fixed: UI and Command manager updates

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
Qstick 2018-08-28 23:01:02 -04:00
parent d9a51a1d02
commit ba96dad8c7
40 changed files with 301 additions and 255 deletions

View file

@ -7,6 +7,7 @@ import styles from './Icon.css';
function Icon(props) {
const {
containerClassName,
className,
name,
kind,
@ -16,11 +17,7 @@ function Icon(props) {
...otherProps
} = props;
if (title && !window.Lidarr.isProduction) {
console.error('Icons cannot have a title');
}
return (
const icon = (
<FontAwesomeIcon
className={classNames(
className,
@ -34,9 +31,23 @@ function Icon(props) {
{...otherProps}
/>
);
if (title) {
return (
<span
className={containerClassName}
title={title}
>
{icon}
</span>
);
}
return icon;
}
Icon.propTypes = {
containerClassName: PropTypes.string,
className: PropTypes.string,
name: PropTypes.object.isRequired,
kind: PropTypes.string.isRequired,