diff --git a/components/RUA/RUAInput.tsx b/components/RUA/RUAInput.tsx index 8e0afc1..2bd1a01 100644 --- a/components/RUA/RUAInput.tsx +++ b/components/RUA/RUAInput.tsx @@ -1,22 +1,17 @@ -import { - ChangeEventHandler, - HTMLInputTypeAttribute, - KeyboardEventHandler, - forwardRef, -} from 'react'; +import { forwardRef, DetailedHTMLProps, InputHTMLAttributes } from 'react'; import cn from 'classnames'; -interface Props { - className?: string; - placeholder?: string; - value?: string | number | readonly string[] | undefined; - type?: HTMLInputTypeAttribute | undefined; - onChange?: ChangeEventHandler | undefined; - onKeyUp?: KeyboardEventHandler | undefined; -} +interface Props + extends DetailedHTMLProps< + InputHTMLAttributes, + HTMLInputElement + > {} const RUAInput = forwardRef( - ({ className, placeholder, value, onChange, onKeyUp, type }, ref) => { + ( + { className, placeholder, value, onChange, onKeyUp, type, ...rest }, + ref + ) => { return ( <> ( value={value} onChange={onChange} onKeyUp={onKeyUp} + {...rest} /> ); diff --git a/layouts/MainLayout.tsx b/layouts/MainLayout.tsx index 1ddb123..bbe4b8b 100644 --- a/layouts/MainLayout.tsx +++ b/layouts/MainLayout.tsx @@ -22,7 +22,7 @@ const MainLayout: FC = ({ children }) => { >