Skip to content

Commit

Permalink
Template Part Block: Update Placeholder Button Styles (#24633)
Browse files Browse the repository at this point in the history
* Remove button group and add tertiary styling to New template part button
  • Loading branch information
jeyip authored Aug 18, 2020
1 parent bc30cd9 commit deec0ae
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ import { __ } from '@wordpress/i18n';
import { useState, useCallback } from '@wordpress/element';
import { useDispatch } from '@wordpress/data';
import { cleanForSlug } from '@wordpress/url';
import {
Placeholder,
Dropdown,
ButtonGroup,
Button,
} from '@wordpress/components';
import { Placeholder, Dropdown, Button } from '@wordpress/components';
import { blockDefault } from '@wordpress/icons';
import { __experimentalSearchForm as SearchForm } from '@wordpress/block-editor';

Expand Down Expand Up @@ -54,18 +49,18 @@ export default function TemplatePartPlaceholder( { setAttributes } ) {
contentClassName="wp-block-template-part__placeholder-preview-dropdown-content"
position="bottom right left"
renderToggle={ ( { isOpen, onToggle } ) => (
<ButtonGroup>
<>
<Button
isPrimary
onClick={ onToggle }
aria-expanded={ isOpen }
>
{ __( 'Choose existing' ) }
</Button>
<Button onClick={ onCreate }>
<Button isTertiary onClick={ onCreate }>
{ __( 'New template part' ) }
</Button>
</ButtonGroup>
</>
) }
renderContent={ () => (
<>
Expand Down

0 comments on commit deec0ae

Please sign in to comment.