UNPKG

@alifd/meet-react

Version:

Fusion Mobile React UI System Component

28 lines (27 loc) 1.22 kB
import { FormEvent, ReactNode } from 'react'; import { InputProps } from '../input'; import { LocaledComponentProps } from '../locale'; import { BaseComponentAttributes } from '../utils/types'; export interface LocaleType { searchTipText?: string; cancelText?: string; } export interface SearchProps extends BaseComponentAttributes, LocaledComponentProps<LocaleType>, Pick<InputProps, 'placeholder' | 'defaultValue' | 'value' | 'disabled' | 'maxLength' | 'enableNative' | 'keyboardType' | 'size'> { searchText?: string; icon?: string | ReactNode; focused?: boolean; hasIcon?: boolean; hasClear?: boolean; hasCancel?: boolean; highlightable?: boolean; cancelText?: string; onChange?: (value: string, e?: FormEvent<HTMLInputElement>) => void; onConfirm?: (value: string, e?: FormEvent<HTMLInputElement>) => void; onSearch?: (value: string, e?: FormEvent<HTMLInputElement>) => void; onClear?: (e?: any) => void; onBlur?: (e?: FormEvent<HTMLInputElement>) => void; onFocus?: () => void; onCancel?: () => void; } declare const _default: import("react").ForwardRefExoticComponent<SearchProps & import("react").RefAttributes<any>>; export default _default;