-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add custom link modal #250
Conversation
} | ||
|
||
return ( | ||
<ModalPortal> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All Modal components should be wrapped in this <ModalPortal>
component, in order to be rendered into the modal-root element.
🎉 View the deployed prototype - https://246-add-modals--ussf-portal-client.netlify.app |
@suzubara There's a bug where:
Would you like a new issue for this? |
@jbecker01 nice find!! No thanks, I will resolve it in this PR |
Another bug that seems related to John's:
|
@jbecker01 @abbyoung both of the above issues should be resolved now! |
@@ -0,0 +1,14 @@ | |||
import { render, RenderOptions } from '@testing-library/react' | |||
|
|||
export const renderWithModalRoot = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use this when writing Jest tests for modal components (or components that render modals)
🎉 View the deployed prototype - https://246-add-modals--ussf-portal-client.netlify.app |
|
There was a problem hiding this 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!
🎉 View the deployed prototype - https://246-add-modals--ussf-portal-client.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great! 🎉
Description
This PR uses a branch of ReactUSWDS that adds the Modal component (trussworks/react-uswds#1622) and sets up a modal root element so we can render modals in the portal app. It builds off #249 to add a modal to that flow where a user can enter a label for a custom link.
Fixes #246
Review Notes
addLink.mp4