Lidarr/frontend/src/Components/SpinnerIcon.js
Mark McDowall fae94f4b8e New: Mass Editor is now part of artists list
(cherry picked from commit a731d24e23b83484da1376d331b2ce998e216690)
2023-10-29 11:25:04 +02:00

34 lines
664 B
JavaScript

import PropTypes from 'prop-types';
import React from 'react';
import { icons } from 'Helpers/Props';
import Icon from './Icon';
function SpinnerIcon(props) {
const {
name,
spinningName,
isSpinning,
...otherProps
} = props;
return (
<Icon
name={isSpinning ? (spinningName || name) : name}
isSpinning={isSpinning}
{...otherProps}
/>
);
}
SpinnerIcon.propTypes = {
className: PropTypes.string,
name: PropTypes.object.isRequired,
spinningName: PropTypes.object.isRequired,
isSpinning: PropTypes.bool.isRequired
};
SpinnerIcon.defaultProps = {
spinningName: icons.SPINNER
};
export default SpinnerIcon;