import React from 'react' /** * Nova FormField – thin wrapper that pairs a label with any input-like child, * plus optional hint and error text. Use this for custom controls (NovaSelect, * Toggle, etc.) that don't carry their own label. * * @prop {string} label - visible label text * @prop {boolean} required - shows red asterisk * @prop {string} error - validation error message * @prop {string} hint - helper text shown below control * @prop {string} htmlFor - id of the labelled element */ export default function FormField({ label, required, error, hint, htmlFor, children, className = '' }) { return (
{label && ( )} {children} {error && (

{error}

)} {!error && hint && (

{hint}

)}
) }