mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-10 09:40:21 +08:00
updated types for react-select/lib/components
This commit is contained in:
4
types/react-select/lib/animated/index.d.ts
vendored
4
types/react-select/lib/animated/index.d.ts
vendored
@@ -1,12 +1,12 @@
|
||||
import { ComponentType } from 'react';
|
||||
import { SelectComponents, defaultComponents } from '../components/index';
|
||||
import { SelectComponents, SelectComponentsConfig } from '../components/index';
|
||||
import { default as AnimatedInput, AnimatedInputProps } from './Input';
|
||||
import { default as AnimatedMultiValue, AnimatedMultiValueProps } from './MultiValue';
|
||||
import { default as AnimatedPlaceholder, AnimatedPlaceholderProps } from './Placeholder';
|
||||
import { default as AnimatedSingleValue, AnimatedSingleValueProps } from './SingleValue';
|
||||
import { default as AnimatedValueContainer, AnimatedValueContainerProps } from './ValueContainer';
|
||||
|
||||
export function makeAnimated<OptionType>(externalComponents?: SelectComponents<OptionType>): SelectComponents<OptionType>;
|
||||
export function makeAnimated<OptionType>(externalComponents?: SelectComponentsConfig<OptionType>): SelectComponents<OptionType>;
|
||||
|
||||
export const Input: ComponentType<AnimatedInputProps>;
|
||||
export const MultiValue: ComponentType<AnimatedMultiValueProps<any>>;
|
||||
|
||||
4
types/react-select/lib/components/Menu.d.ts
vendored
4
types/react-select/lib/components/Menu.d.ts
vendored
@@ -30,8 +30,8 @@ import {
|
||||
// Get Menu Placement
|
||||
// ------------------------------
|
||||
|
||||
interface MenuState { placement: 'bottom' | 'top' | null; maxHeight: number; }
|
||||
interface PlacementArgs {
|
||||
export interface MenuState { placement: 'bottom' | 'top' | null; maxHeight: number; }
|
||||
export interface PlacementArgs {
|
||||
maxHeight: number;
|
||||
menuEl: ElementRef<any>;
|
||||
minHeight: number;
|
||||
|
||||
36
types/react-select/lib/components/index.d.ts
vendored
36
types/react-select/lib/components/index.d.ts
vendored
@@ -81,36 +81,10 @@ export interface SelectComponents<OptionType> {
|
||||
|
||||
export type SelectComponentsConfig<OptionType> = Partial<SelectComponents<OptionType>>;
|
||||
|
||||
export namespace components {
|
||||
const ClearIndicator: IndicatorComponentType<any> | null;
|
||||
const Control: ComponentType<ControlProps<any>>;
|
||||
const DropdownIndicator: IndicatorComponentType<any> | null;
|
||||
const DownChevron: ComponentType<any>;
|
||||
const CrossIcon: ComponentType<any>;
|
||||
const Group: ComponentType<GroupProps<any>>;
|
||||
const GroupHeading: ComponentType<any>;
|
||||
const IndicatorsContainer: ComponentType<IndicatorContainerProps<any>>;
|
||||
const IndicatorSeparator: IndicatorComponentType<any> | null;
|
||||
const Input: ComponentType<InputProps>;
|
||||
const LoadingIndicator: ComponentType<LoadingIconProps<any>> | null;
|
||||
const Menu: ComponentType<MenuProps<any>>;
|
||||
const MenuList: ComponentType<MenuListComponentProps<any>>;
|
||||
const MenuPortal: ComponentType<MenuPortalProps<any>>;
|
||||
const LoadingMessage: ComponentType<NoticeProps<any>>;
|
||||
const NoOptionsMessage: ComponentType<NoticeProps<any>>;
|
||||
const MultiValue: ComponentType<MultiValueProps<any>>;
|
||||
const MultiValueContainer: ComponentType<any>;
|
||||
const MultiValueLabel: ComponentType<any>;
|
||||
const MultiValueRemove: ComponentType<any>;
|
||||
const Option: ComponentType<OptionProps<any>>;
|
||||
const Placeholder: ComponentType<PlaceholderProps<any>>;
|
||||
const SelectContainer: ComponentType<ContainerProps<any>>;
|
||||
const SingleValue: ComponentType<SingleValueProps<any>>;
|
||||
const ValueContainer: ComponentType<ValueContainerProps<any>>;
|
||||
export const components: Required<SelectComponents<any>>;
|
||||
|
||||
export interface Props<OptionType> {
|
||||
components: SelectComponentsConfig<OptionType>;
|
||||
}
|
||||
|
||||
export interface Props {
|
||||
components: SelectComponentsConfig<any>;
|
||||
}
|
||||
|
||||
export function defaultComponents(props: Props): SelectComponentsConfig<any>;
|
||||
export function defaultComponents<OptionType>(props: Props<OptionType>): SelectComponents<OptionType>;
|
||||
|
||||
Reference in New Issue
Block a user