input 추가
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import moment from 'moment';
|
||||
import { useEffect } from 'react';
|
||||
import { ChangeEvent, useState } from 'react';
|
||||
import { useState } from 'react';
|
||||
import { motion } from 'framer-motion';
|
||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||
import { FilterSelect } from '@/shared/ui/filter/select';
|
||||
|
||||
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