Readarr/frontend/src/Components/Link/IconButton.js
Qstick 3f064c94b9
New: Release Profiles, Frontend updates (#580)
* New: Release Profiles - UI Updates

* New: Release Profiles - API Changes

* New: Release Profiles - Test Updates

* New: Release Profiles - Backend Updates

* New: Interactive Artist Search

* New: Change Montiored on Album Details Page

* New: Show Duration on Album Details Page

* Fixed: Manual Import not working if no albums are Missing

* Fixed: Sort search input by sortTitle

* Fixed: Queue columnLabel throwing JS error
2019-02-23 17:39:11 -05:00

55 lines
1 KiB
JavaScript

import PropTypes from 'prop-types';
import React from 'react';
import classNames from 'classnames';
import Icon from 'Components/Icon';
import Link from './Link';
import styles from './IconButton.css';
function IconButton(props) {
const {
className,
iconClassName,
name,
kind,
size,
isSpinning,
isDisabled,
...otherProps
} = props;
return (
<Link
className={classNames(
className,
isDisabled && styles.isDisabled
)}
isDisabled={isDisabled}
{...otherProps}
>
<Icon
className={iconClassName}
name={name}
kind={kind}
size={size}
isSpinning={isSpinning}
/>
</Link>
);
}
IconButton.propTypes = {
className: PropTypes.string.isRequired,
iconClassName: PropTypes.string,
kind: PropTypes.string,
name: PropTypes.object.isRequired,
size: PropTypes.number,
isSpinning: PropTypes.bool,
isDisabled: PropTypes.bool
};
IconButton.defaultProps = {
className: styles.button,
size: 12
};
export default IconButton;