import React from 'react'; import { RegisterOptions, useFormContext } from 'react-hook-form'; import * as S from './Input.styled'; export interface InputProps extends React.InputHTMLAttributes, Omit { name?: string; hookFormOptions?: RegisterOptions; leftIcon?: string; rightIcon?: string; } const Input: React.FC = ({ name, hookFormOptions, leftIcon, rightIcon, inputSize = 'L', ...rest }) => { const methods = useFormContext(); return ( {leftIcon && ( )} {name ? ( ) : ( )} {rightIcon && ( )} ); }; export default Input;