forked from WordPress/gutenberg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Ensure consistency in editor tools for navigation buttons and de…
…lete options (WordPress#67253) * fix: ensure consistency in editor tools for navigation buttons and delete options * Fix: remove shadow icon * Fix: remove redandunt styling * Fix: use lower case in confirmation message Co-authored-by: Sarah Norris <[email protected]> --------- Co-authored-by: Sarah Norris <[email protected]> Co-authored-by: sarthaknagoshe2002 <[email protected]> Co-authored-by: mikachan <[email protected]> Co-authored-by: madhusudhand <[email protected]>
- Loading branch information
1 parent
12f7764
commit 9297500
Showing
2 changed files
with
97 additions
and
5 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
packages/edit-site/src/components/global-styles/confirm-reset-shadow-dialog.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components'; | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
function ConfirmResetShadowDialog( { | ||
text, | ||
confirmButtonText, | ||
isOpen, | ||
toggleOpen, | ||
onConfirm, | ||
} ) { | ||
const handleConfirm = async () => { | ||
toggleOpen(); | ||
onConfirm(); | ||
}; | ||
|
||
const handleCancel = () => { | ||
toggleOpen(); | ||
}; | ||
|
||
return ( | ||
<ConfirmDialog | ||
isOpen={ isOpen } | ||
cancelButtonText={ __( 'Cancel' ) } | ||
confirmButtonText={ confirmButtonText } | ||
onCancel={ handleCancel } | ||
onConfirm={ handleConfirm } | ||
size="medium" | ||
> | ||
{ text } | ||
</ConfirmDialog> | ||
); | ||
} | ||
|
||
export default ConfirmResetShadowDialog; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters