@confi/conflux-react-ui-test-package
Version:
Modern and minimalist React UI library.
38 lines (37 loc) • 1.26 kB
TypeScript
import React from 'react';
import { NormalSizes } from '../utils/prop-types';
import SelectOption from './select-option';
interface Props {
disabled?: boolean;
size?: NormalSizes;
value?: string | string[];
initialValue?: string | string[];
placeholder?: React.ReactNode | string;
icon?: React.ComponentType;
onChange?: (value: string | string[]) => void;
pure?: boolean;
multiple?: boolean;
className?: string;
width?: string;
dropdownClassName?: string;
dropdownStyle?: object;
disableMatchWidth?: boolean;
}
declare const defaultProps: {
disabled: boolean;
size: "mini" | "small" | "medium" | "large";
icon: React.ComponentType<{}>;
pure: boolean;
multiple: boolean;
width: string;
className: string;
disableMatchWidth: boolean;
};
declare type NativeAttrs = Omit<React.HTMLAttributes<any>, keyof Props>;
export declare type SelectProps = Props & typeof defaultProps & NativeAttrs;
declare type SelectComponent<P = {}> = React.FC<P> & {
Option: typeof SelectOption;
};
declare type ComponentProps = Partial<typeof defaultProps> & Omit<Props, keyof typeof defaultProps> & NativeAttrs;
declare const _default: SelectComponent<ComponentProps>;
export default _default;