Skip to content

Commit

Permalink
Add toggle button icon and visually hidden text.
Browse files Browse the repository at this point in the history
  • Loading branch information
afercia committed Jul 20, 2022
1 parent d78a367 commit a8f06ca
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions packages/edit-site/src/components/list/actions/index.js
Expand Up @@ -4,8 +4,13 @@
import { useDispatch } from '@wordpress/data';
import { store as coreStore } from '@wordpress/core-data';
import { __ } from '@wordpress/i18n';
import { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';
import { chevronDown } from '@wordpress/icons';
import {
DropdownMenu,
MenuGroup,
MenuItem,
VisuallyHidden,
} from '@wordpress/components';
import { Icon, chevronDown, reset } from '@wordpress/icons';
import { store as noticesStore } from '@wordpress/notices';

/**
Expand All @@ -26,7 +31,14 @@ export default function Actions( { template } ) {
const isRevertable = isTemplateRevertable( template );

if ( ! isRemovable && ! isRevertable ) {
return __( 'No actions' );
return (
<>
<Icon icon={ reset } />
<VisuallyHidden>
{ __( 'No actions available' ) }
</VisuallyHidden>
</>
);
}

async function revertAndSaveTemplate() {
Expand Down

0 comments on commit a8f06ca

Please sign in to comment.