mirror of
https://github.com/Sonarr/Sonarr
synced 2025-03-04 10:39:34 +00:00
Remove defaultProps from TypeScript components
This commit is contained in:
parent
9a7ddd751e
commit
a90c13e86f
3 changed files with 4 additions and 27 deletions
|
@ -5,9 +5,11 @@ import EnhancedSelectInputOption, {
|
|||
} from './EnhancedSelectInputOption';
|
||||
import styles from './HintedSelectInputOption.css';
|
||||
|
||||
interface HintedSelectInputOptionProps extends EnhancedSelectInputOptionProps {
|
||||
interface HintedSelectInputOptionProps
|
||||
extends Omit<EnhancedSelectInputOptionProps, 'isSelected'> {
|
||||
value: string;
|
||||
hint?: React.ReactNode;
|
||||
isSelected?: boolean;
|
||||
}
|
||||
|
||||
function HintedSelectInputOption(props: HintedSelectInputOptionProps) {
|
||||
|
@ -17,7 +19,7 @@ function HintedSelectInputOption(props: HintedSelectInputOptionProps) {
|
|||
hint,
|
||||
depth,
|
||||
isSelected = false,
|
||||
isDisabled,
|
||||
isMultiSelect,
|
||||
isMobile,
|
||||
...otherProps
|
||||
} = props;
|
||||
|
@ -27,8 +29,6 @@ function HintedSelectInputOption(props: HintedSelectInputOptionProps) {
|
|||
id={id}
|
||||
depth={depth}
|
||||
isSelected={isSelected}
|
||||
isDisabled={isDisabled}
|
||||
isHidden={isDisabled}
|
||||
isMobile={isMobile}
|
||||
{...otherProps}
|
||||
>
|
||||
|
@ -43,10 +43,4 @@ function HintedSelectInputOption(props: HintedSelectInputOptionProps) {
|
|||
);
|
||||
}
|
||||
|
||||
HintedSelectInputOption.defaultProps = {
|
||||
isDisabled: false,
|
||||
isHidden: false,
|
||||
isMultiSelect: false,
|
||||
};
|
||||
|
||||
export default HintedSelectInputOption;
|
||||
|
|
|
@ -42,7 +42,6 @@ interface IndexerSelectInputConnectorProps {
|
|||
name: string;
|
||||
value: number;
|
||||
includeAny?: boolean;
|
||||
values: object[];
|
||||
onChange: (change: EnhancedSelectInputChanged<number>) => void;
|
||||
}
|
||||
|
||||
|
@ -74,8 +73,4 @@ function IndexerSelectInput({
|
|||
);
|
||||
}
|
||||
|
||||
IndexerSelectInput.defaultProps = {
|
||||
includeAny: false,
|
||||
};
|
||||
|
||||
export default IndexerSelectInput;
|
||||
|
|
|
@ -356,16 +356,4 @@ TagInput.propTypes = {
|
|||
onTagReplace: PropTypes.func,
|
||||
};
|
||||
|
||||
TagInput.defaultProps = {
|
||||
className: styles.internalInput,
|
||||
inputContainerClassName: styles.input,
|
||||
allowNew: true,
|
||||
kind: kinds.INFO,
|
||||
placeholder: '',
|
||||
delimiters: ['Tab', 'Enter', ' ', ','],
|
||||
minQueryLength: 1,
|
||||
canEdit: false,
|
||||
tagComponent: TagInputTag,
|
||||
};
|
||||
|
||||
export default TagInput;
|
||||
|
|
Loading…
Add table
Reference in a new issue