mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
43 lines
781 B
JavaScript
43 lines
781 B
JavaScript
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import Icon from 'Components/Icon';
|
|
import MenuButton from 'Components/Menu/MenuButton';
|
|
import styles from './PageMenuButton.css';
|
|
|
|
function PageMenuButton(props) {
|
|
const {
|
|
iconName,
|
|
indicator,
|
|
text,
|
|
...otherProps
|
|
} = props;
|
|
|
|
return (
|
|
<MenuButton
|
|
className={styles.menuButton}
|
|
{...otherProps}
|
|
>
|
|
<Icon
|
|
name={iconName}
|
|
size={18}
|
|
/>
|
|
|
|
<div className={styles.label}>
|
|
{text}
|
|
</div>
|
|
</MenuButton>
|
|
);
|
|
}
|
|
|
|
PageMenuButton.propTypes = {
|
|
iconName: PropTypes.object.isRequired,
|
|
text: PropTypes.string,
|
|
indicator: PropTypes.bool.isRequired
|
|
};
|
|
|
|
PageMenuButton.defaultProps = {
|
|
indicator: false
|
|
};
|
|
|
|
export default PageMenuButton;
|