diff --git a/packages/edit-site/src/components/global-styles/ui.js b/packages/edit-site/src/components/global-styles/ui.js index 986ec21dc9dd46..8d62da34f49668 100644 --- a/packages/edit-site/src/components/global-styles/ui.js +++ b/packages/edit-site/src/components/global-styles/ui.js @@ -11,6 +11,7 @@ import { __experimentalNavigatorScreen as NavigatorScreen, __experimentalUseNavigator as useNavigator, createSlotFill, + Button, DropdownMenu, MenuGroup, MenuItem, @@ -142,33 +143,42 @@ function GlobalStylesRevisionsMenu() { return ( - - { ( { onClose } ) => ( - - { hasRevisions && ( + { canReset || hasRevisions ? ( + + { ( { onClose } ) => ( + + { hasRevisions && ( + + { revisionsCount } + + } + > + { __( 'Revision history' ) } + + ) } - { revisionsCount } - - } + onClick={ () => { + onReset(); + onClose(); + } } + disabled={ ! canReset } > - { __( 'Revision history' ) } + { __( 'Reset to defaults' ) } - ) } - { - onReset(); - onClose(); - } } - disabled={ ! canReset } - > - { __( 'Reset to defaults' ) } - - - ) } - + + ) } + + ) : ( +