blob: db989769578f216fbe9157f8cffdfb4f9375e1e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import * as React from 'react';
import { useTextInut } from '~/hooks/useTextInput';
import s from './TextFitler.module.scss';
import type { RecoilState } from 'recoil';
export function TextFilter(props: { textAtom: RecoilState<string>; placeholder?: string }) {
const [onChange, text] = useTextInut(props.textAtom);
return (
<input
className={s.input}
type="text"
value={text}
onChange={onChange}
placeholder={props.placeholder}
/>
);
}
|