1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-17 21:26:13 -04:00
Files
Sonarr/frontend/src/Components/Form/Select/HintedSelectInputOption.tsx
2025-03-15 16:39:19 -07:00

46 lines
1.0 KiB
TypeScript

import classNames from 'classnames';
import React from 'react';
import EnhancedSelectInputOption, {
EnhancedSelectInputOptionProps,
} from './EnhancedSelectInputOption';
import styles from './HintedSelectInputOption.css';
interface HintedSelectInputOptionProps
extends Omit<EnhancedSelectInputOptionProps, 'isSelected'> {
value: string;
hint?: React.ReactNode;
isSelected?: boolean;
}
function HintedSelectInputOption(props: HintedSelectInputOptionProps) {
const {
id,
value,
hint,
depth,
isSelected = false,
isMobile,
...otherProps
} = props;
return (
<EnhancedSelectInputOption
id={id}
depth={depth}
isSelected={isSelected}
isMobile={isMobile}
{...otherProps}
>
<div
className={classNames(styles.optionText, isMobile && styles.isMobile)}
>
<div>{value}</div>
{hint != null && <div className={styles.hintText}>{hint}</div>}
</div>
</EnhancedSelectInputOption>
);
}
export default HintedSelectInputOption;