import { useState } from 'react' type Props = { onSearch: (username: string) => void } export function SearchScreen({ onSearch }: Props) { const [value, setValue] = useState('') const handleSubmit = (e: React.FormEvent) => { e.preventDefault() const trimmed = value.trim() if (trimmed) onSearch(trimmed) } return (

GitHub Stats

Generate your profile widget

setValue(e.target.value)} placeholder="Enter GitHub username..." autoFocus className="flex-1 px-4 py-3 rounded-xl border border-gray-200 bg-white text-sm text-gray-800 placeholder:text-gray-300 focus:outline-none focus:ring-1 focus:ring-gray-300 transition-colors" />
) }