mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-07 13:32:17 -07:00
Fixed: UI and Command manager updates
Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
parent
d9a51a1d02
commit
ba96dad8c7
40 changed files with 301 additions and 255 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue