bug(#2685): Move modal GoaButtonGroup actions#464
Conversation
✅ Deploy Preview for abgov-ui-component-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| {...componentProps} | ||
| open={open} | ||
| actions={ | ||
| <GoabButtonGroup alignment="end" mt={"xl"}> |
There was a problem hiding this comment.
There was a problem hiding this comment.
Thanks, @twjeffery . I removed the mt attribute completely.
twjeffery
left a comment
There was a problem hiding this comment.
@willcodeforcoffee the examples look good now to me, thanks for updating.
One more thing I noticed, the modal component example in the sandbox on the first tab has actions, but the code snippet below shows no actions in a slot or otherwise (see code below):
<GoabButton onClick={onClick}>
Show Modal
</GoabButton>
<GoabModal heading="Are you sure you want to exit your application?" open={open}>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Mollitia obcaecati id molestiae, natus dicta, eaque qui iusto similique, libero explicabo eligendi eius laboriosam! Repellendus ducimus officia asperiores. Eos, eius numquam.
</p>
</GoabModal>
<GoAButton onClick={onClick}>
Show Modal
</GoAButton>
<GoAModal heading="Are you sure you want to exit your application?" open={open}>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Mollitia obcaecati id molestiae, natus dicta, eaque qui iusto similique, libero explicabo eligendi eius laboriosam! Repellendus ducimus officia asperiores. Eos, eius numquam.
</p>
</GoAModal>
I'm not exactly sure how to change that generated code to properly show the actions within a slot like you've added, but @chrisolsen likely would
@twjeffery You are right, and @chrisolsen does not believe we can do it with the way the code generation works on the front page. I tried a few different things but they didn't work. |
|
@twjeffery per our Slack discussion, I've removed the "Close" logic out of the Sandbox, and added a comment into the modal itself directing users to the Examples tab and learn more about using the actions for customization. |




This PR fixes GovAlta/ui-components#2685
It puts the ButtonGroup into the
Modal#actionssection properly.Unfortunately the file had to get reformatted, which complicates reviewing it. I've separated the PR into two commits, the first reformats the file, the second has the change.