input 추가
This commit is contained in:
30
src/shared/ui/filter/input.tsx
Normal file
30
src/shared/ui/filter/input.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import { ChangeEvent } from 'react';
|
||||
|
||||
export interface FilterInputProps {
|
||||
title: string;
|
||||
inputValue: string;
|
||||
inputSetter: (value: any) => void;
|
||||
};
|
||||
export const FilterInput = ({
|
||||
title,
|
||||
inputValue,
|
||||
inputSetter
|
||||
}: FilterInputProps) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="opt-field">
|
||||
<div className="opt-label">{ title }</div>
|
||||
<div className="opt-controls">
|
||||
<input
|
||||
className="flex-1"
|
||||
type="text"
|
||||
placeholder=""
|
||||
value={ inputValue }
|
||||
onChange={ (e: ChangeEvent<HTMLInputElement>) => inputSetter(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user