mirror of
https://github.com/CarGDev/debug-dojo.git
synced 2025-09-18 09:58:37 +00:00

- Add PokemonAutoComplete atom component using Ant Design - Implement API layer with axios for Pokémon data fetching - Create Zustand store for centralized state management - Add autocomplete suggestions with real-time filtering - Update SearchBar molecule to use autocomplete functionality - Load all Pokémon names on app initialization - Add path aliases for cleaner imports (@api, @stores) - Remove old service layer in favor of API layer - Maintain intentional bugs for debugging practice - Update project structure and documentation
24 lines
473 B
TypeScript
24 lines
473 B
TypeScript
import React from 'react';
|
|
import { Input } from 'antd';
|
|
|
|
interface PokemonInputProps {
|
|
value: string;
|
|
onChange: (value: string) => void;
|
|
placeholder?: string;
|
|
}
|
|
|
|
export const PokemonInput: React.FC<PokemonInputProps> = ({
|
|
value,
|
|
onChange,
|
|
placeholder = 'Enter Pokémon name...'
|
|
}) => {
|
|
return (
|
|
<Input
|
|
value={value}
|
|
onChange={(e) => onChange(e.target.value)}
|
|
placeholder={placeholder}
|
|
size="large"
|
|
allowClear
|
|
/>
|
|
);
|
|
};
|