Skip to content

Commit

Permalink
Use button instead of actual toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Dec 12, 2024
1 parent 13cd621 commit 6c6a816
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { __ } from '@wordpress/i18n';
import { useMemo, useState } from '@wordpress/element';
import { privateApis as routerPrivateApis } from '@wordpress/router';
import { useViewportMatch } from '@wordpress/compose';
import { ToggleControl } from '@wordpress/components';
import { Button } from '@wordpress/components';
import { addQueryArgs } from '@wordpress/url';

/**
Expand All @@ -24,14 +24,15 @@ const GlobalStylesPageActions = ( {
setIsStyleBookOpened,
} ) => {
return (
<ToggleControl
__nextHasNoMarginBottom
label={ __( 'Show Style Book' ) }
checked={ isStyleBookOpened }
onChange={ ( newValue ) => {
setIsStyleBookOpened( newValue );
<Button
isPressed={ isStyleBookOpened }
onClick={ () => {
setIsStyleBookOpened( ! isStyleBookOpened );
} }
/>
size="compact"
>
{ __( 'Style Book' ) }
</Button>
);
};

Expand Down

0 comments on commit 6c6a816

Please sign in to comment.