"use client"; import { Search, X } from "lucide-react"; import { useTranslations } from "next-intl"; import { Input } from "@/components/ui/input"; type SearchInputProps = { value: string; onChange: (value: string) => void; placeholder?: string; onClear?: () => void; }; /** Admin search field with a leading search icon and optional clear button. */ export function SearchInput({ value, onChange, placeholder, onClear, }: SearchInputProps) { const t = useTranslations("pages.admin.table"); return (
onChange(e.target.value)} style={{ paddingLeft: 36, paddingRight: 40 }} className="pl-9 pr-10 h-9" /> {value && onClear && ( )}
); }