Uh oh!
There was an error while loading. Please reload this page.
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/primer/primer-components/HmeyoR757LBjNvnZBxpwjujBC3KY |
|
| const confirm = useConfirm() | ||
| const buttonClick = React.useCallback( | ||
| e => { | ||
| // @todo The docs site live code examples don't work with async/await, so using the raw promise instead! |
There was a problem hiding this comment.
Out of curiosity: Do you know why the docs site live code examples don’t work with async/await? And is that tracked in an issue?
There was a problem hiding this comment.
My guess is it's an old babel dependency or configuration. I don't believe it's tracked in an issue. I assume this would be a doctocat bug? I'm not exactly sure how the live code samples get compiled.
There was a problem hiding this comment.
Looks like there's an open issue for it in react-live (the library we use for live code examples) FormidableLabs/react-live#206
There was a problem hiding this comment.
Updated the sample to use async function() since apparently that works 🤷
VanAnderson
left a comment
There was a problem hiding this comment.
Just a couple of small things I saw that I had some questions on, probably nothing blocking. Really great job on this!
Uh oh!
There was an error while loading. Please reload this page.
| | Prop name | Type | Default | Description | | ||
| | :----------------- | :-------------------------------------------------------------------- | :--------- | :---------------------------------------------------------------------------------------------------------------------------- | | ||
| | title | `string` | | Required. Sets the title of the dialog, which by default is also used as the `aria-labelledby` attribute. | |
There was a problem hiding this comment.
has the behavior of assigning the title to aria-labelledby been implemented? Can't see where that is happening in either Dialog or ConfirmationDialog
There was a problem hiding this comment.
It happens here: https://github.com/primer/components/blob/main/src/Dialog/Dialog.tsx#L286
Were you expecting something else?
There was a problem hiding this comment.
whoops, must have missed that!
dgreif
left a comment
There was a problem hiding this comment.
Really cool to see these components starting to stack! Great implementation, this is going to be really fun to use ✨
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Vinicius Depizzol <vdepizzol@github.com>
This PR adds a
ConfirmationDialogcomponent and a helper hook,useConfirm. AConfirmationDialogis an opinionated dialog that is used specifically to confirm a user's choice. See the rendered documentation for more details.Closes#1065
Screenshots
Merge checklist