- 서비스 목록 페이지 (검색/필터/페이지네이션, 행 클릭 → 상세) - 서비스 상세 페이지 (헤더카드/통계/플랫폼 관리 모달) - 서비스 등록 페이지 (서비스명/플랫폼 선택/설명/관련링크) - 서비스 수정 페이지 (상태 토글/메타정보/저장 확인 모달) - 공통 훅 추출 (useShake, useBreadcrumbBack) - 브레드크럼 동적 경로 지원 (/services/:id, /services/:id/edit) - 인증 페이지 useShake 공통 훅 리팩터링 Closes #14
40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
interface SearchInputProps {
|
|
value: string;
|
|
onChange: (value: string) => void;
|
|
placeholder?: string;
|
|
label?: string;
|
|
disabled?: boolean;
|
|
}
|
|
|
|
/** 검색 아이콘 + 텍스트 입력 */
|
|
export default function SearchInput({
|
|
value,
|
|
onChange,
|
|
placeholder = "검색...",
|
|
label,
|
|
disabled,
|
|
}: SearchInputProps) {
|
|
return (
|
|
<div className="flex-1">
|
|
{label && (
|
|
<label className="block text-xs font-medium text-gray-600 mb-1.5">
|
|
{label}
|
|
</label>
|
|
)}
|
|
<div className="relative">
|
|
<span className="absolute left-3 top-1/2 -translate-y-1/2 material-symbols-outlined text-gray-400 text-base">
|
|
search
|
|
</span>
|
|
<input
|
|
type="text"
|
|
value={value}
|
|
onChange={(e) => onChange(e.target.value)}
|
|
placeholder={placeholder}
|
|
disabled={disabled}
|
|
className="w-full h-[38px] pl-10 pr-3 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-gray-50"
|
|
/>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|