summaryrefslogtreecommitdiff
path: root/src/components/shared/TextFitler.tsx
diff options
context:
space:
mode:
authorHaishan <[email protected]>2021-06-06 00:32:24 +0800
committerHaishan <[email protected]>2021-06-06 00:33:22 +0800
commit5ff2f89afb71fd2976c487692ec73085241e09c7 (patch)
treefe7a53d8839b1406e4ff31a2fa8a543669c7693f /src/components/shared/TextFitler.tsx
parent25dbe5eff483bfdceec677b13ad4ec905c5fe566 (diff)
Stop use postcss-nested postcss-extend-rule
Diffstat (limited to 'src/components/shared/TextFitler.tsx')
-rw-r--r--src/components/shared/TextFitler.tsx21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/components/shared/TextFitler.tsx b/src/components/shared/TextFitler.tsx
new file mode 100644
index 0000000..e4a4a88
--- /dev/null
+++ b/src/components/shared/TextFitler.tsx
@@ -0,0 +1,21 @@
+import * as React from 'react';
+import type { RecoilState } from 'recoil';
+import { useTextInut } from 'src/hooks/useTextInput';
+
+import s from './TextFitler.module.scss';
+
+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}
+ />
+ );
+}