@commercetools-uikit/select-utils
Version:
Utilities for working with select components.
25 lines (24 loc) • 1.48 kB
TypeScript
import type { ReactElement } from 'react';
import type { ClearIndicatorProps, ContainerProps, ControlProps, DropdownIndicatorProps, GroupHeadingProps, GroupProps, IndicatorSeparatorProps, IndicatorsContainerProps, InputProps, LoadingIndicatorProps, MenuListProps, MenuProps, MultiValueGenericProps, MultiValueProps, MultiValueRemoveProps, NoticeProps, OptionProps, PlaceholderProps, SingleValueProps, ValueContainerProps } from 'react-select';
export type TReactSelectCustomComponentsProps = ClearIndicatorProps | ControlProps | DropdownIndicatorProps | GroupProps | GroupHeadingProps | IndicatorsContainerProps | IndicatorSeparatorProps | InputProps | LoadingIndicatorProps | MenuProps | MenuListProps | NoticeProps | MultiValueProps | MultiValueGenericProps | MultiValueRemoveProps | OptionProps | PlaceholderProps | ContainerProps | SingleValueProps | ValueContainerProps;
export type TSelectInputCustomComponentProps<T extends TReactSelectCustomComponentsProps> = T & {
selectProps: T['selectProps'] & {
isCondensed?: boolean;
isReadOnly?: boolean;
iconLeft?: ReactElement<{
size?: string;
}>;
};
};
/**
* @deprecated Use `TTagRemoveProps['selectProps]` instead
*/
export type TTagRemoveSelectProps = {
isReadOnly: boolean;
} & MultiValueGenericProps['selectProps'];
/**
* @deprecated Use `TWrapperWithIconProps['selectProps]` instead
*/
export type TWrapperWithIconSelectProps = {
iconLeft?: ReactElement;
};