mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
Fixed: UI and Command manager updates
Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -45,9 +45,10 @@ function Message(props) {
|
||||
styles[type]
|
||||
)}
|
||||
>
|
||||
<div className={styles.iconContainer} title={name}>
|
||||
<div className={styles.iconContainer}>
|
||||
<Icon
|
||||
name={getIconName(name)}
|
||||
title={name}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user