Skip to content

Commit

Permalink
chore: change Otter Patterns button order & Premium Designs appearance [
Browse files Browse the repository at this point in the history
closes #2456]
  • Loading branch information
abaicus committed Nov 28, 2024
1 parent da2f844 commit 82668ee
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/blocks/plugins/patterns-library/library.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
useState
} from '@wordpress/element';

import { grid } from '@wordpress/icons';
import { external, grid, Icon } from '@wordpress/icons';

/**
* Internal dependencies.
Expand Down Expand Up @@ -213,13 +213,24 @@ const Library = ({
{ __( 'My Favorites', 'otter-blocks' ) }
</Button>

{tcCategories.length < 1 && (
<Button
icon="open-folder"
isPressed={ 'cloud-empty' === selectedCategory }
onClick={ () => setSelectedCategory( CLOUD_EMPTY_CATEGORY ) }
>
{ __( 'Cloud Libraries', 'otter-blocks' ) }
</Button>
) }

{ ( ! Boolean( window.themeisleGutenberg.hasPro ) ) && (
<Button
icon="lock"
href="https://themeisle.com/plugins/otter-blocks/patterns/"
target="_blank"
>
{ __( 'Premium Designs', 'otter-blocks' ) }
<Icon icon={external} size={15} />
</Button>
) }

Expand All @@ -244,15 +255,6 @@ const Library = ({
</ul>
</>
)}
{tcCategories.length < 1 && (
<Button
icon="lock"
isPressed={ 'cloud-empty' === selectedCategory }
onClick={ () => setSelectedCategory( CLOUD_EMPTY_CATEGORY ) }
>
{ __( 'Cloud Libraries', 'otter-blocks' ) }
</Button>
) }

<p className="o-library__modal__sidebar__heading">
{ __( 'Categories', 'otter-blocks' ) }
Expand Down

0 comments on commit 82668ee

Please sign in to comment.