mirror of
https://github.com/Radarr/Radarr
synced 2026-01-26 17:33:13 +01:00
Bulk update to make all component props immutable at the type level. This prevents accidental prop mutation and improves type safety. Resolves ~50 SonarCloud code smells.
32 lines
676 B
TypeScript
32 lines
676 B
TypeScript
import React from 'react';
|
|
import SpinnerIcon from 'Components/SpinnerIcon';
|
|
import { icons } from 'Helpers/Props';
|
|
import styles from './CollectionFooterLabel.css';
|
|
|
|
interface CollectionFooterLabelProps {
|
|
className?: string;
|
|
label: string;
|
|
isSaving: boolean;
|
|
}
|
|
|
|
function CollectionFooterLabel({
|
|
className = styles.label,
|
|
label,
|
|
isSaving,
|
|
}: Readonly<CollectionFooterLabelProps>) {
|
|
return (
|
|
<div className={className}>
|
|
{label}
|
|
|
|
{isSaving ? (
|
|
<SpinnerIcon
|
|
className={styles.savingIcon}
|
|
name={icons.SPINNER}
|
|
isSpinning={true}
|
|
/>
|
|
) : null}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default CollectionFooterLabel;
|