- Agrega permiso de menu para vania.barrios@tagumedica.com - Renombra test/ a tools/ (colecciones de requests SAP/ApiGateway) - Renombra vistas de frontend con sufijo View para consistencia - Refactor de componentes UI compartidos y agrega utilidades (Icon, PageLoader, SecondaryButton, FieldTooltip, errors)
27 lines
685 B
TypeScript
27 lines
685 B
TypeScript
import type { KeyboardEvent } from "react";
|
|
|
|
interface SearchInputProps {
|
|
value: string;
|
|
placeholder?: string;
|
|
onChange: (value: string) => void;
|
|
onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;
|
|
}
|
|
|
|
export default function SearchInput({
|
|
value,
|
|
placeholder,
|
|
onChange,
|
|
onKeyDown,
|
|
}: SearchInputProps) {
|
|
return (
|
|
<input
|
|
type="text"
|
|
value={value}
|
|
placeholder={placeholder}
|
|
onChange={(e) => onChange(e.target.value)}
|
|
onKeyDown={onKeyDown}
|
|
className="w-full h-7 px-2 py-0 text-xs bg-[var(--color-surface)] border border-[var(--color-input-border)] rounded-none outline-none focus:border-[var(--color-primary)]"
|
|
/>
|
|
);
|
|
}
|