Skip to content

Add form field wrapper #248

Closed
Closed
@stuarthendren

Description

@stuarthendren

What problem do you want to solve?

Single component to handle for errors etc.

What do you think is the correct solution to this problem?

API something like:

            <FieldProvider
              name="nameFirst"
              id="register-nameFirst"
              required
              error={fieldErrors?.nameFirst}
            >
              <Label>First Name</Label>
              <Input defaultValue={fields?.nameFirst} />
              <FieldError />
            </FieldProvider>

Or simpler

            <FieldProvider
              name="nameFirst"
              id="register-nameFirst"
              label="Name"
              required
              error={fieldErrors?.nameFirst}
              defaultValue={fields?.nameFirst} 
              type="input"
            >

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions