Skip to content

Commit

Permalink
Swap the Chevron icon button for a text button
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskoster committed Feb 23, 2021
1 parent f480b49 commit 7289088
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions packages/block-library/src/template-part/edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ import {
store as blockEditorStore,
} from '@wordpress/block-editor';
import {
Button,
SelectControl,
Dropdown,
PanelBody,
ToolbarGroup,
ToolbarButton,
Spinner,
} from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { chevronUp, chevronDown } from '@wordpress/icons';
import { store as coreStore } from '@wordpress/core-data';

/**
Expand Down Expand Up @@ -131,17 +130,15 @@ export default function TemplatePartEdit( {
contentClassName="wp-block-template-part__preview-dropdown-content"
position="bottom right left"
renderToggle={ ( { isOpen, onToggle } ) => (
<ToolbarButton
<Button
aria-expanded={ isOpen }
icon={
isOpen ? chevronUp : chevronDown
}
label={ __( 'Choose another' ) }
onClick={ onToggle }
// Disable when open to prevent odd FireFox bug causing reopening.
// As noted in https://github.com/WordPress/gutenberg/pull/24990#issuecomment-689094119 .
disabled={ isOpen }
/>
>
{ __( 'Replace' ) }
</Button>
) }
renderContent={ ( { onClose } ) => (
<TemplatePartSelection
Expand Down

0 comments on commit 7289088

Please sign in to comment.