Skip to content

Conversation

mahoneycm
Copy link
Contributor

@mahoneycm mahoneycm commented Jul 26, 2024

Summary

Created error state Storybook controls and preview to showcase error styles.

Breaking change

This is not a breaking change

Related issue

Closes #5991

Related pull requests

No changelog created. Not a user-facing change.

Preview link

Text input error story →

Problem statement

We need stories to showcase error states on the design system website.

Solution

Create an error state storybook preview for text input to match existing controls.

Major changes

  • New option for state control for text input component
  • New error state input story
  • Conditional logic wraps each text input and it's relevant labels in usa-form-group usa-form-group--error divs.

Testing and review

  1. Visit text input story
  2. Confirm controls work as expected
  3. Confirm the error input has expected markup
  4. Confirm error state is displaying correctly
  5. Confirm there are no regressions in other states
  6. Confirm pattern matches existing variants / components

@mahoneycm mahoneycm marked this pull request as ready for review July 26, 2024 19:55
@mahoneycm mahoneycm requested review from mejiaj and amyleadem July 26, 2024 19:55
Copy link
Contributor

@amyleadem amyleadem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting this prepped so quickly, @mahoneycm. I had a few small notes in the comments below. Let me know if you have any questions.

@mahoneycm mahoneycm requested a review from amyleadem August 6, 2024 21:10
Copy link
Contributor

@amyleadem amyleadem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks @mahoneycm

Copy link
Contributor

@mejiaj mejiaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I can see all form error states.

@thisisdano thisisdano merged commit e65bc75 into develop Oct 3, 2024
5 checks passed
@thisisdano thisisdano deleted the cm-input-error-story branch October 3, 2024 04:07
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.

USWDS - Feature: Create Input error state Storybook preview
4 participants