mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-08 05:51:47 -07:00
Update to FontAwesome5
This commit is contained in:
parent
b0238c1af4
commit
afc4aeb25f
23 changed files with 258 additions and 5138 deletions
|
@ -1,6 +1,7 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import { icons, kinds } from 'Helpers/Props';
|
||||
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
|
||||
import { kinds } from 'Helpers/Props';
|
||||
import classNames from 'classnames';
|
||||
import styles from './Icon.css';
|
||||
|
||||
|
@ -11,38 +12,42 @@ function Icon(props) {
|
|||
kind,
|
||||
size,
|
||||
title,
|
||||
isSpinning
|
||||
isSpinning,
|
||||
...otherProps
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<i
|
||||
<FontAwesomeIcon
|
||||
className={classNames(
|
||||
name,
|
||||
className,
|
||||
styles[kind],
|
||||
isSpinning && icons.SPIN
|
||||
styles[kind]
|
||||
)}
|
||||
icon={name}
|
||||
spin={isSpinning}
|
||||
title={title}
|
||||
style={{
|
||||
fontSize: `${size}px`
|
||||
}}
|
||||
{...otherProps}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Icon.propTypes = {
|
||||
className: PropTypes.string,
|
||||
name: PropTypes.string.isRequired,
|
||||
name: PropTypes.object.isRequired,
|
||||
kind: PropTypes.string.isRequired,
|
||||
size: PropTypes.number.isRequired,
|
||||
title: PropTypes.string,
|
||||
isSpinning: PropTypes.bool.isRequired
|
||||
isSpinning: PropTypes.bool.isRequired,
|
||||
fixedWidth: PropTypes.bool.isRequired
|
||||
};
|
||||
|
||||
Icon.defaultProps = {
|
||||
kind: kinds.DEFAULT,
|
||||
size: 14,
|
||||
isSpinning: false
|
||||
isSpinning: false,
|
||||
fixedWidth: false
|
||||
};
|
||||
|
||||
export default Icon;
|
||||
|
|
|
@ -35,7 +35,7 @@ IconButton.propTypes = {
|
|||
className: PropTypes.string.isRequired,
|
||||
iconClassName: PropTypes.string,
|
||||
kind: PropTypes.string,
|
||||
name: PropTypes.string.isRequired,
|
||||
name: PropTypes.object.isRequired,
|
||||
size: PropTypes.number,
|
||||
isSpinning: PropTypes.bool
|
||||
};
|
||||
|
|
|
@ -45,7 +45,7 @@ SpinnerButton.propTypes = {
|
|||
className: PropTypes.string.isRequired,
|
||||
isSpinning: PropTypes.bool.isRequired,
|
||||
isDisabled: PropTypes.bool,
|
||||
spinnerIcon: PropTypes.string.isRequired,
|
||||
spinnerIcon: PropTypes.object.isRequired,
|
||||
children: PropTypes.node
|
||||
};
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ function SpinnerIconButton(props) {
|
|||
}
|
||||
|
||||
SpinnerIconButton.propTypes = {
|
||||
name: PropTypes.string.isRequired,
|
||||
spinningName: PropTypes.string.isRequired,
|
||||
name: PropTypes.object.isRequired,
|
||||
spinningName: PropTypes.object.isRequired,
|
||||
isDisabled: PropTypes.bool.isRequired,
|
||||
isSpinning: PropTypes.bool.isRequired
|
||||
};
|
||||
|
|
|
@ -51,7 +51,7 @@ class SelectedMenuItem extends Component {
|
|||
SelectedMenuItem.propTypes = {
|
||||
name: PropTypes.string,
|
||||
children: PropTypes.node.isRequired,
|
||||
selectedIconName: PropTypes.string.isRequired,
|
||||
selectedIconName: PropTypes.object.isRequired,
|
||||
isSelected: PropTypes.bool.isRequired,
|
||||
onPress: PropTypes.func.isRequired
|
||||
};
|
||||
|
|
|
@ -7,7 +7,5 @@
|
|||
}
|
||||
|
||||
.label {
|
||||
height: 14px;
|
||||
color: $toolbarLabelColor;
|
||||
font-size: $extraSmallFontSize;
|
||||
composes: label from 'Components/Page/Toolbar/PageToolbarButton.css';
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ function ToolbarMenuButton(props) {
|
|||
<div>
|
||||
<Icon
|
||||
name={iconName}
|
||||
size={22}
|
||||
size={21}
|
||||
/>
|
||||
|
||||
<div className={styles.label}>
|
||||
|
@ -31,7 +31,7 @@ function ToolbarMenuButton(props) {
|
|||
}
|
||||
|
||||
ToolbarMenuButton.propTypes = {
|
||||
iconName: PropTypes.string.isRequired,
|
||||
iconName: PropTypes.object.isRequired,
|
||||
text: PropTypes.string
|
||||
};
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ class PageSidebarItem extends Component {
|
|||
}
|
||||
|
||||
PageSidebarItem.propTypes = {
|
||||
iconName: PropTypes.string,
|
||||
iconName: PropTypes.object,
|
||||
title: PropTypes.string.isRequired,
|
||||
to: PropTypes.string.isRequired,
|
||||
isActive: PropTypes.bool,
|
||||
|
|
|
@ -28,7 +28,7 @@ function PageToolbarButton(props) {
|
|||
<Icon
|
||||
name={isSpinning ? (spinningName || iconName) : iconName}
|
||||
isSpinning={isSpinning}
|
||||
size={22}
|
||||
size={21}
|
||||
/>
|
||||
|
||||
<div className={styles.labelContainer}>
|
||||
|
@ -42,8 +42,8 @@ function PageToolbarButton(props) {
|
|||
|
||||
PageToolbarButton.propTypes = {
|
||||
label: PropTypes.string.isRequired,
|
||||
iconName: PropTypes.string.isRequired,
|
||||
spinningName: PropTypes.string,
|
||||
iconName: PropTypes.object.isRequired,
|
||||
spinningName: PropTypes.object,
|
||||
isSpinning: PropTypes.bool,
|
||||
isDisabled: PropTypes.bool
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue