trussworks / react-uswds

USWDS 3.0 components built in React
https://trussworks.github.io/react-uswds/
Apache License 2.0
177 stars 80 forks source link

[docs] Storybook: odd styling for label with required marker #2866

Open reggieriser opened 4 months ago

reggieriser commented 4 months ago

Does this documentation relate to a specific USWDS feature?

Yes, see the styling of a Label with Required Marker.

Is your documentation related to a problem or inconsistency? Please describe.

The styling of the required marker shows some dots underneath which shouldn't be there:

Screenshot 2024-04-02 at 12 15 27 PM

Describe the documentation you'd like

Ensure the styling matches what USWDS shows for a required field.

Additional context

I think this is related to the fact that the label is not within the context of a form element with the usa-form class (there's actually no form at all). Perhaps this label and any other form fields could be rendered in Storybook within the context of a form with the proper class?

crwallace commented 3 months ago

@reggieriser is this a documentation need or a bug fix related to styling? Just want to make sure I am understanding this correctly.

reggieriser commented 3 months ago

@crwallace ... I would categorize it as more of a documentation fix (assuming we consider Storybook to be documentation). For more context, see this Slack thread.