Skip to content

Commit

Permalink
Clean reset styles command (#54841)
Browse files Browse the repository at this point in the history
  • Loading branch information
richtabor committed Sep 27, 2023
1 parent 08de5b3 commit b90db31
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions packages/edit-site/src/hooks/commands/use-common-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@
*/
import { useMemo } from '@wordpress/element';
import { useDispatch, useSelect } from '@wordpress/data';
import { __ } from '@wordpress/i18n';
import { trash, backup, help, styles, external, brush } from '@wordpress/icons';
import { __, isRTL } from '@wordpress/i18n';
import {
rotateLeft,
rotateRight,
backup,
help,
styles,
external,
brush,
} from '@wordpress/icons';
import { useCommandLoader, useCommand } from '@wordpress/commands';
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
import { privateApis as routerPrivateApis } from '@wordpress/router';
Expand Down Expand Up @@ -148,8 +156,8 @@ function useGlobalStylesResetCommands() {
return [
{
name: 'core/edit-site/reset-global-styles',
label: __( 'Reset styles to defaults' ),
icon: trash,
label: __( 'Reset styles' ),
icon: isRTL() ? rotateRight : rotateLeft,
callback: ( { close } ) => {
close();
onReset();
Expand Down

0 comments on commit b90db31

Please sign in to comment.