Skip to content

Commit

Permalink
refactor: remove unused type
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorGoryany committed Aug 2, 2024
1 parent d676953 commit 495ffc9
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/harmony/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,6 @@ interface SelectPanelProps extends Omit<ComponentProps<typeof DropdownPanel>, 'o
title?: string;
}

/**
* The definition SelectGuardedProps<T> defines a type that includes `onChange` & `mode` props.
* If the mode property is `single`, the onChange method should accept a single value of type T.
* If the mode property is `multiple`, the onChange method should accept an array of values of type T.
*/
export type SelectGuardedProps<T> =
| { mode: 'single'; onChange?: (value: T) => void }
| { mode: 'multiple'; onChange?: (value: T[]) => void };

export const SelectPanel = ({ placement = 'top-start', title, children, iconLeft, ...rest }: SelectPanelProps) => {
const { open, onClose, items = [], value, onChange, mode, selectable, renderItem } = useContext(SelectContext);

Expand Down

0 comments on commit 495ffc9

Please sign in to comment.