Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed May 9, 2024
1 parent 5d9f316 commit fd4fcda
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,19 @@ export const INSERTER_SYNC_TYPES = {
export const allPatternsCategory = {
name: 'allPatterns',
label: _x( 'All', 'patterns' ),
isFeatured: true,
};

export const myPatternsCategory = {
name: 'myPatterns',
label: __( 'My patterns' ),
isFeatured: true,
};

export const starterContentCategory = {
name: 'core/content',
label: __( 'Starter content' ),
isFeatured: true,
};

export function isPatternFiltered( pattern, sourceFilter, syncFilter ) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* External dependencies
*/
import clsx from 'clsx';

/**
* WordPress dependencies
*/
Expand Down Expand Up @@ -42,7 +47,12 @@ function CategoryTabs( {
<Tabs.Tab
key={ category.name }
tabId={ category.name }
className="block-editor-inserter__category-tab"
className={ clsx(
'block-editor-inserter__category-tab',
{
'is-featured': category.isFeatured,
}
) }
aria-label={ category.label }
aria-current={
category === selectedCategory ? 'true' : undefined
Expand Down
9 changes: 9 additions & 0 deletions packages/block-editor/src/components/inserter/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,15 @@ $block-inserter-tabs-height: 44px;
position: relative;
height: auto;

&.is-featured:last-of-type {
background: red!important;
margin-bottom: $grid-unit-20;
}

// &.is-featured:not(:has(~.is-featured))
// margin-bottom: $grid-unit-20;
// }

&[aria-selected="true"] {
color: var(--wp-admin-theme-color);

Expand Down

0 comments on commit fd4fcda

Please sign in to comment.