diff --git a/src/SearchBar/index.tsx b/src/SearchBar/index.tsx index e3f30531..f554ae16 100644 --- a/src/SearchBar/index.tsx +++ b/src/SearchBar/index.tsx @@ -12,7 +12,7 @@ import Tag from '@/Tag'; import { useStyles } from './style'; export interface SearchBarProps extends Omit { - classNames: { + classNames?: { input?: string; shortKey?: string; }; @@ -37,7 +37,7 @@ export interface SearchBarProps extends Omit( onBlur, onPressEnter, onFocus, - styles: { input: inputStyle, shortKey: shortKeyStyle }, - classNames: { input: inputClassName, shortKey: shortKeyClassName }, + styles: { input: inputStyle, shortKey: shortKeyStyle } = {}, + classNames: { input: inputClassName, shortKey: shortKeyClassName } = {}, ...rest }) => { const [inputValue, setInputValue] = useControlledState(defaultValue as any, {