import * as React from 'react' import './SearchSpec.scss' interface SearchSpecProps extends React.RefAttributes { value: string onSearch: (query: string) => void } export const SearchSpec: React.FC = React.forwardRef((props, ref) => { const onKeyUp = (e: React.KeyboardEvent) => { if (e.key === 'Escape') { // types are wrong? (ref as React.MutableRefObject).current?.blur() } } return (
props.onSearch(e.currentTarget.value.toLowerCase())} />
) })