1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2025-03-12 23:13:44 +00:00
Lidarr/frontend/src/Components/SpinnerIcon.js

34 lines
633 B
JavaScript
Raw Normal View History

2017-09-03 22:20:56 -04:00
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}
2017-09-03 22:20:56 -04:00
{...otherProps}
/>
);
}
SpinnerIcon.propTypes = {
name: PropTypes.object.isRequired,
spinningName: PropTypes.object.isRequired,
2017-09-03 22:20:56 -04:00
isSpinning: PropTypes.bool.isRequired
};
SpinnerIcon.defaultProps = {
spinningName: icons.SPINNER
};
export default SpinnerIcon;