Skip to content

Commit

Permalink
Use as prop instead of classname
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Jun 23, 2023
1 parent da9b7e1 commit 5e3d5dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/edit-site/src/components/add-new-pattern/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { privateApis as routerPrivateApis } from '@wordpress/router';
*/
import CreatePatternModal from '../create-pattern-modal';
import CreateTemplatePartModal from '../create-template-part-modal';
import SidebarButton from '../sidebar-button';
import { unlock } from '../../lock-unlock';

const { useHistory } = unlock( routerPrivateApis );
Expand Down Expand Up @@ -66,7 +67,7 @@ export default function AddNewPattern() {
},
] }
toggleProps={ {
className: 'edit-site-sidebar-button',
as: SidebarButton,
} }
icon={ plus }
label={ __( 'Create pattern' ) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export default function SidebarNavigationScreen( {
) }
{ ! isRoot && backPath && (
<SidebarButton
as={ SidebarButton }
onClick={ () => goTo( backPath, { isBack: true } ) }
icon={ icon }
label={ __( 'Back' ) }
Expand Down

0 comments on commit 5e3d5dc

Please sign in to comment.