fix(SW-1509): new select filter props interface
This commit is contained in:
@@ -13,7 +13,7 @@ import { MaterialIcon } from '../Icons/MaterialIcon'
|
|||||||
import { Typography } from '../Typography'
|
import { Typography } from '../Typography'
|
||||||
import { SelectItem } from './SelectItem'
|
import { SelectItem } from './SelectItem'
|
||||||
|
|
||||||
import type { SelectProps } from './types'
|
import type { SelectFilterProps } from './types'
|
||||||
|
|
||||||
import styles from './select.module.css'
|
import styles from './select.module.css'
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ export function SelectFilter({
|
|||||||
isDisabled,
|
isDisabled,
|
||||||
icon,
|
icon,
|
||||||
itemIcon,
|
itemIcon,
|
||||||
}: SelectProps) {
|
}: SelectFilterProps) {
|
||||||
const [focus, setFocus] = useState(false)
|
const [focus, setFocus] = useState(false)
|
||||||
const [value, setValue] = useState<Key | null>(null)
|
const [value, setValue] = useState<Key | null>(null)
|
||||||
const iconColor = isDisabled ? 'Icon/Interactive/Disabled' : 'Icon/Default'
|
const iconColor = isDisabled ? 'Icon/Interactive/Disabled' : 'Icon/Default'
|
||||||
|
|||||||
@@ -24,3 +24,8 @@ export interface SelectItemProps extends ComponentProps<typeof ListBoxItem> {
|
|||||||
icon?: MaterialIconProps['icon']
|
icon?: MaterialIconProps['icon']
|
||||||
children: string
|
children: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Disabling rule because we're just omitting one prop while keeping interface
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
|
export interface SelectFilterProps
|
||||||
|
extends Omit<SelectProps, 'enableFiltering'> {}
|
||||||
|
|||||||
Reference in New Issue
Block a user