You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readarr/frontend/src/Components/Link/IconButton.js

45 lines
793 B

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