@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
35 lines (34 loc) • 1.01 kB
TypeScript
import { CSSProperties } from 'react';
import { type InputProps } from "../Input";
export interface SearchBarProps extends Omit<InputProps, 'styles' | 'classNames'> {
classNames?: {
input?: string;
shortKey?: string;
};
defaultValue?: string;
/**
* @description Whether to enable the shortcut key to focus on the input
* @default false
*/
enableShortKey?: boolean;
loading?: boolean;
onInputChange?: (value: string) => void;
/**
* @description Whether add spotlight background
* @default false
*/
onSearch?: (value: string) => void;
/**
* @description The shortcut key to focus on the input. Only works if `enableShortKey` is true
* @default 'f'
*/
shortKey?: string;
spotlight?: boolean;
styles?: {
input?: CSSProperties;
shortKey?: CSSProperties;
};
value?: string;
}
declare const SearchBar: import("react").NamedExoticComponent<SearchBarProps>;
export default SearchBar;