Skip to content

Conversation

@daniele-zurico
Copy link
Contributor

@daniele-zurico daniele-zurico commented Mar 24, 2022

Do not merge yet... have an intial look to validate:

  • added hint - (hint?: HintProps)
  • added static error message - (staticErrorMessage)
  • added ability to define errorClassName (containerClassNameError)
  • write test
  • update storybook

Usage:

<FormInput
      label={label}
      containerClassName="govuk-form-group"
      inputClassName="govuk-input govuk-!-width-two-thirds"
      labelClassName="govuk-label"
      name={id}
      inputProps={{ id: id }}
      type="text"
      value={value}
      hint={{
        position: "above",
        text: hint,
        id: id_hint,
        className: "govuk-hint govuk-!-width-two-thirds",
      }}
      errorProps={{ className: "govuk-error-message" }}
      staticErrorMessage={error?.message}
      errorPosition={ErrorPosition.AFTER_LABEL}
      containerClassNameError="govuk-form-group--error"
    />

@Ibabalola Ibabalola merged commit 4c4654e into release/0.4 Mar 24, 2022
@Ibabalola Ibabalola linked an issue Jun 17, 2022 that may be closed by this pull request
@daniele-zurico daniele-zurico deleted the feature/forminput-hint branch March 14, 2024 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants