Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change Otter Patterns button order & Premium Designs appearance #2459

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading