import { Show, createSignal, splitProps } from 'solid-js' import { JSX } from 'solid-js/jsx-runtime' import { CloseIcon } from '../icons/CloseIcon' type Props = { ref: HTMLInputElement | undefined onInput: (value: string) => void onClear: () => void } & Omit, 'onInput'> export const SearchInput = (props: Props) => { const [value, setValue] = createSignal('') const [local, others] = splitProps(props, ['onInput', 'ref']) const changeValue = (value: string) => { setValue(value) local.onInput(value) } const clearValue = () => { setValue('') props.onClear() } return (
changeValue(e.currentTarget.value)} {...others} /> 0}>
) }