From bacd57a735de5787eb8ea5e0a1a1aabb4b6fa20c Mon Sep 17 00:00:00 2001 From: Christian Andolf Date: Wed, 9 Apr 2025 11:51:37 +0200 Subject: [PATCH] fix(SW-1509): new select filter props interface --- .../design-system/lib/components/Select/SelectFilter.tsx | 4 ++-- packages/design-system/lib/components/Select/types.ts | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/design-system/lib/components/Select/SelectFilter.tsx b/packages/design-system/lib/components/Select/SelectFilter.tsx index 33c9886f1..ec65f91c3 100644 --- a/packages/design-system/lib/components/Select/SelectFilter.tsx +++ b/packages/design-system/lib/components/Select/SelectFilter.tsx @@ -13,7 +13,7 @@ import { MaterialIcon } from '../Icons/MaterialIcon' import { Typography } from '../Typography' import { SelectItem } from './SelectItem' -import type { SelectProps } from './types' +import type { SelectFilterProps } from './types' import styles from './select.module.css' @@ -25,7 +25,7 @@ export function SelectFilter({ isDisabled, icon, itemIcon, -}: SelectProps) { +}: SelectFilterProps) { const [focus, setFocus] = useState(false) const [value, setValue] = useState(null) const iconColor = isDisabled ? 'Icon/Interactive/Disabled' : 'Icon/Default' diff --git a/packages/design-system/lib/components/Select/types.ts b/packages/design-system/lib/components/Select/types.ts index 9eeabfa22..78708943d 100644 --- a/packages/design-system/lib/components/Select/types.ts +++ b/packages/design-system/lib/components/Select/types.ts @@ -24,3 +24,8 @@ export interface SelectItemProps extends ComponentProps { icon?: MaterialIconProps['icon'] 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 {}