hydropd / website /src /components /Field.tsx
rikardsaqe's picture
Deploy HydroPD container (30 usable models, fixed README)
27124e1 verified
Raw
History Blame Contribute Delete
446 Bytes
import type { ReactNode } from 'react'
interface FieldProps {
label: ReactNode
hint?: ReactNode
htmlFor?: string
children: ReactNode
}
export default function Field({ label, hint, htmlFor, children }: FieldProps) {
return (
<div className="field">
<label className="field-label" htmlFor={htmlFor}>
{label}
{hint && <span className="field-hint">{hint}</span>}
</label>
{children}
</div>
)
}