Web components: Alert alpha component #187
Open
+762
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Experimental version of the alert component.
Related issue
Closes #94
Preview link
Screenshot:

Problem statement
If the USWDS team isn't available to review this PR right away, I totally understand -- but I did want to make sure this work was visible and easily accessible to the USWDS team 🙏 This is a follow-up from the gist I shared in August. I've updated that to reflect the current patterns in the USWDS repo.
We want to be able to iterate on the development of more components, such as this alert component. By getting in an experimental/early version of this component, we'll be set up to iterate on it together.
In Maryland, we are developing web components such as this one for use in Maryland's Web Design System. We want to make sure our work is aligned with USWDS, and contributed back to USWDS, as much as possible.
Solution
This experimental version of the alert component is maybe 70% done.
The approach taken for this component is aligned with USWDS Elements standards / ADRs as much as possible, including: using TypeScript, using JSDoc, organization of files (separate
.cssfile, etc).Issues for follow-up
These are some remaining issues I didn't get to in this spike.
These could be done in follow-up pull requests (this PR is already very big!).
:root, :host {}on these to use them in both page and component environments?set-link-from-bg)Testing and review
npm run storybookand see the alert component in action.