mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-08 05:51:47 -07:00
New: Indicator when Filter Applied
This commit is contained in:
parent
edda5b1433
commit
1a0ef56bac
4 changed files with 38 additions and 2 deletions
|
@ -1,5 +1,7 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { icons } from 'Helpers/Props';
|
||||
import Icon from 'Components/Icon';
|
||||
import MenuButton from 'Components/Menu/MenuButton';
|
||||
import styles from './ToolbarMenuButton.css';
|
||||
|
@ -7,6 +9,7 @@ import styles from './ToolbarMenuButton.css';
|
|||
function ToolbarMenuButton(props) {
|
||||
const {
|
||||
iconName,
|
||||
indicator,
|
||||
text,
|
||||
...otherProps
|
||||
} = props;
|
||||
|
@ -22,6 +25,21 @@ function ToolbarMenuButton(props) {
|
|||
size={21}
|
||||
/>
|
||||
|
||||
{
|
||||
indicator &&
|
||||
<span
|
||||
className={classNames(
|
||||
styles.indicatorContainer,
|
||||
'fa-layers fa-fw'
|
||||
)}
|
||||
>
|
||||
<Icon
|
||||
name={icons.CIRCLE}
|
||||
size={9}
|
||||
/>
|
||||
</span>
|
||||
}
|
||||
|
||||
<div className={styles.labelContainer}>
|
||||
<div className={styles.label}>
|
||||
{text}
|
||||
|
@ -34,7 +52,12 @@ function ToolbarMenuButton(props) {
|
|||
|
||||
ToolbarMenuButton.propTypes = {
|
||||
iconName: PropTypes.object.isRequired,
|
||||
text: PropTypes.string
|
||||
text: PropTypes.string,
|
||||
indicator: PropTypes.bool.isRequired
|
||||
};
|
||||
|
||||
ToolbarMenuButton.defaultProps = {
|
||||
indicator: false
|
||||
};
|
||||
|
||||
export default ToolbarMenuButton;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue