mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Initial Commit Rework
This commit is contained in:
parent
74a4cc048c
commit
95051cbd63
2483 changed files with 101351 additions and 111396 deletions
37
frontend/src/Components/Link/SpinnerIconButton.js
Normal file
37
frontend/src/Components/Link/SpinnerIconButton.js
Normal file
|
@ -0,0 +1,37 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import { icons } from 'Helpers/Props';
|
||||
import IconButton from './IconButton';
|
||||
|
||||
function SpinnerIconButton(props) {
|
||||
const {
|
||||
name,
|
||||
spinningName,
|
||||
isDisabled,
|
||||
isSpinning,
|
||||
...otherProps
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<IconButton
|
||||
name={isSpinning ? `${spinningName || name} fa-spin` : name}
|
||||
isDisabled={isDisabled || isSpinning}
|
||||
{...otherProps}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
SpinnerIconButton.propTypes = {
|
||||
name: PropTypes.string.isRequired,
|
||||
spinningName: PropTypes.string.isRequired,
|
||||
isDisabled: PropTypes.bool.isRequired,
|
||||
isSpinning: PropTypes.bool.isRequired
|
||||
};
|
||||
|
||||
SpinnerIconButton.defaultProps = {
|
||||
spinningName: icons.SPINNER,
|
||||
isDisabled: false,
|
||||
isSpinning: false
|
||||
};
|
||||
|
||||
export default SpinnerIconButton;
|
Loading…
Add table
Add a link
Reference in a new issue