Bug: va-alert content no longer aligns to site content width #3545
Labels
DST-engineering
Issues that require work from Design System Team engineers
va-alert
va-banner
DS Banner component
Description
It was recently flagged that va-alert content no longer aligns with site content width. After some investigation, this can be attributed to a change in uswds alert styles that removed some margin settings, and moved them to the usa-site-alert class. This change was introduced into the component library when we updated to USWDS version 3.9.0, but wasn't caught because it isn't mentioned in the release notes, and isn't highlighted in the changed files of the PR they were a part of.
Steps to Reproduce
Potential Solutions
We need to use the
usa-site-alert
styles to fix this regression. Here is a local screenshot withusa-site-alert usa-site-alert--info
added to a wrapper element:Because not every va-alert (and va-banner by extension since it just renders an alert) needs to be full width, there are a couple of approaches we can take to addressing this:
va-alert
component to accept a prop for conditionally rendering a full-width usa-site-alert banner. This would conditionally render a wrapping div and the necessary classes that correlate to whatever status is passed in. Example:Considerations
@use usa-site-alert/src/styles/usa-site-alert
Tasks
Acceptance Criteria
The text was updated successfully, but these errors were encountered: