Spaces:
Sleeping
Sleeping
Aissugur Kurganbekov
Claude Opus 4.8 (1M context)
UI/UX pass: accessibility, motion, design tokens, and an eval results chart
c412fbd Download frontend/src/components/ui/Field.jsx from financeflow/ai: direct link, hf CLI and curl.
- Browser
- Download file 931 Bytes
-
https://huggingface.co/spaces/financeflow/ai/resolve/main/frontend/src/components/ui/Field.jsx
- Command line
-
hf download hf://spaces/financeflow/ai/frontend/src/components/ui/Field.jsx
-
curl -L -o Field.jsx https://huggingface.co/spaces/financeflow/ai/resolve/main/frontend/src/components/ui/Field.jsx
931 Bytes
| // Field primitives: labelled Textarea and Select wrappers. | |
| export function Textarea({ label, error, id, className = "", ...rest }) { | |
| const errId = error && id ? `${id}-err` : error ? "field-err" : undefined; | |
| return ( | |
| <label className="field"> | |
| {label && <span className="field-label">{label}</span>} | |
| <textarea | |
| id={id} | |
| className={`textarea ${className}`} | |
| aria-invalid={error ? true : undefined} | |
| aria-describedby={errId} | |
| {...rest} | |
| /> | |
| {error && ( | |
| <span className="field-error" id={errId} role="alert"> | |
| {error} | |
| </span> | |
| )} | |
| </label> | |
| ); | |
| } | |
| export function Select({ label, children, className = "", ...rest }) { | |
| return ( | |
| <label className="field"> | |
| {label && <span className="field-label">{label}</span>} | |
| <select className={`select ${className}`} {...rest}> | |
| {children} | |
| </select> | |
| </label> | |
| ); | |
| } | |