spartan-ui
Version:
React component library that focusses on getting the basics right leaving the design up to you
26 lines (25 loc) • 697 B
TypeScript
import React, { FunctionComponent } from 'react';
import { CommonProps } from '../../types';
interface Option {
label: string;
value: string;
}
export interface SelectProps extends CommonProps {
name: string;
id?: string;
disabled?: boolean;
autocomplete?: boolean;
autofocus?: boolean;
defaultValue?: string;
multiple?: boolean;
options: Option[];
placeholder?: string;
readonly?: boolean;
required?: boolean;
size?: number;
value?: string;
onBlur?: (e: React.FocusEvent) => void;
onChange?: (e: React.ChangeEvent) => void;
}
declare const Select: FunctionComponent<SelectProps>;
export default Select;