Skip to content

Commit

Permalink
use BaseStyles provider in ConfirmationDialog (#4035)
Browse files Browse the repository at this point in the history
* use BaseStyles provider in ConfirmationDialog

* changeset
  • Loading branch information
keithamus authored Dec 8, 2023
1 parent bca709d commit 6497f71
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/rotten-apples-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': patch
---

use <BaseStyles> in confirm()
9 changes: 6 additions & 3 deletions src/ConfirmationDialog/ConfirmationDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {FocusKeys} from '@primer/behaviors'
import {get} from '../constants'
import {Dialog, DialogProps, DialogHeaderProps, DialogButtonProps} from '../Dialog/Dialog'
import {useFocusZone} from '../hooks/useFocusZone'
import BaseStyles from '../BaseStyles'

/**
* Props to customize the ConfirmationDialog.
Expand Down Expand Up @@ -163,9 +164,11 @@ async function confirm(themeProps: ThemeProviderProps, options: ConfirmOptions):
}
root.render(
<ThemeProvider {...themeProps}>
<ConfirmationDialog {...confirmationDialogProps} onClose={onClose}>
{content}
</ConfirmationDialog>
<BaseStyles>
<ConfirmationDialog {...confirmationDialogProps} onClose={onClose}>
{content}
</ConfirmationDialog>
</BaseStyles>
</ThemeProvider>,
)
})
Expand Down

0 comments on commit 6497f71

Please sign in to comment.