Spaces:
Running
Running
Download new/frontends/react/src/ui/InputField.tsx from elvis-hf/cnn_visualizer: direct link, hf CLI and curl.
- Browser
- Download file 513 Bytes
-
https://huggingface.co/spaces/elvis-hf/cnn_visualizer/resolve/main/new/frontends/react/src/ui/InputField.tsx
- Command line
-
hf download hf://spaces/elvis-hf/cnn_visualizer/new/frontends/react/src/ui/InputField.tsx
-
curl -L -o InputField.tsx https://huggingface.co/spaces/elvis-hf/cnn_visualizer/resolve/main/new/frontends/react/src/ui/InputField.tsx
513 Bytes
| interface InputFieldProps { | |
| label: string; | |
| value?: string; | |
| onChange?: (newValue: string) => void; | |
| } | |
| export default function InputField({ label, value, onChange }: InputFieldProps) { | |
| return ( | |
| <div className="flex flex-col gap-1"> | |
| <label className="text-gray-700 text-sm">{label}</label> | |
| <input | |
| type="text" | |
| value={value} | |
| onChange={(e) => onChange && onChange(e.target.value)} | |
| className="p-2 rounded bg-white border border-gray-300" | |
| /> | |
| </div> | |
| ); | |
| } |