/* eslint-disable react/jsx-props-no-spreading */ import { merge } from 'lodash'; import { default as Input, InputProps } from './Input'; import { Search, Error } from '@dodoex/icons'; import { useTheme } from '@mui/system'; import { HoverOpacity } from '../Hover'; import { Box } from '../Box'; interface Props extends InputProps { hideSearchIcon?: boolean; clearValue?: () => void; } export default function SearchInput({ clearValue, hideSearchIcon, height = 48, inputSx, ...attrs }: Props) { const theme = useTheme(); const { value } = attrs; return ( ) : null } suffix={ value && clearValue ? ( ) : null } {...attrs} inputSx={merge( { pl: 4, }, inputSx, )} height={height} /> ); }