Lidarr/frontend/src/Components/SpinnerIcon.tsx
Treycos 1b92bf0814 Convert SpinnerIcon to TypeScript
(cherry picked from commit 25d9f09a43ded9dd07c6777390fc541ca5f89eeb)
2024-08-27 04:50:56 +00:00

21 lines
486 B
TypeScript

import React from 'react';
import { icons } from 'Helpers/Props';
import Icon, { IconProps } from './Icon';
export interface SpinnerIconProps extends IconProps {
spinningName?: IconProps['name'];
isSpinning: Required<IconProps['isSpinning']>;
}
export default function SpinnerIcon({
name,
spinningName = icons.SPINNER,
...otherProps
}: SpinnerIconProps) {
return (
<Icon
name={(otherProps.isSpinning && spinningName) || name}
{...otherProps}
/>
);
}