diff --git a/packages/frontend/src/components/SearchBar.tsx b/packages/frontend/src/components/SearchBar.tsx index a81b9f98..af369271 100644 --- a/packages/frontend/src/components/SearchBar.tsx +++ b/packages/frontend/src/components/SearchBar.tsx @@ -6,7 +6,7 @@ import { Input, InputProps } from './shared/Input'; const SearchBar: React.ForwardRefRenderFunction< HTMLInputElement, InputProps & RefAttributes -> = ({ value, onChange, placeholder = 'Search', ...props }) => { +> = ({ value, onChange, placeholder = 'Search', ...props }, ref) => { return (
); diff --git a/packages/frontend/src/components/shared/Input/Input.tsx b/packages/frontend/src/components/shared/Input/Input.tsx index 503e3d32..0c1841a3 100644 --- a/packages/frontend/src/components/shared/Input/Input.tsx +++ b/packages/frontend/src/components/shared/Input/Input.tsx @@ -4,7 +4,6 @@ import { useMemo, ComponentPropsWithoutRef, } from 'react'; -import { FieldValues, UseFormRegister } from 'react-hook-form'; import { WarningIcon } from 'components/shared/CustomIcon'; import { cloneIcon } from 'utils/cloneIcon'; @@ -12,7 +11,7 @@ import { cn } from 'utils/classnames'; import { InputTheme, inputTheme } from './Input.theme'; -export interface InputProps +export interface InputProps extends InputTheme, Omit, 'size'> { label?: string; @@ -20,9 +19,6 @@ export interface InputProps leftIcon?: ReactNode; rightIcon?: ReactNode; helperText?: string; - - // react-hook-form optional register - register?: ReturnType>; } const Input = forwardRef( @@ -34,7 +30,6 @@ const Input = forwardRef( leftIcon, rightIcon, helperText, - register, size, state, appearance, @@ -107,12 +102,11 @@ const Input = forwardRef(
{leftIcon && renderLeftIcon} {rightIcon && renderRightIcon}