Skip to content

Commit

Permalink
Clarify docs
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentSmedinga committed Sep 27, 2024
1 parent 8d5a326 commit 03e5eb6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion storybook/src/components/Dialog/Dialog.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ This ensures correct whitespace and scrolling behaviour.
At the same time, this will position the buttons outside the `form` element.
Create an `id` for the form and add it to the submit Button’s `form` attribute to connect the two.

If the Action Group needs to live inside of the `form`, add a medium bottom margin (`ams-mb--md`) to the element before it and make scrolling work correctly.
If the Action Group must be in the `form`, implement the whitespace and scrolling behaviour as well.
Add a medium bottom margin (`ams-mb--md`) to the element before it.
Make sure the content of the form scrolls if necessary, while the Action Group is visible at the bottom at all times.

The form returns the `value` of the submit Button, which allows inferring which Button the user clicked.
For more information, see [Handling the return value from the dialog (MDN)](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog#handling_the_return_value_from_the_dialog).
Expand Down

0 comments on commit 03e5eb6

Please sign in to comment.