Skip to content

Commit

Permalink
Replace span with Badge component in Inspector in page editor
Browse files Browse the repository at this point in the history
  • Loading branch information
prasadkarmalkar committed Dec 18, 2024
1 parent 44a48b8 commit c552875
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
10 changes: 0 additions & 10 deletions packages/fields/src/fields/page-title/style.scss

This file was deleted.

6 changes: 3 additions & 3 deletions packages/fields/src/fields/page-title/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { __ } from '@wordpress/i18n';
import { useSelect } from '@wordpress/data';
import { store as coreStore } from '@wordpress/core-data';
import type { Settings } from '@wordpress/core-data';

import { Badge } from '@wordpress/components';
/**
* Internal dependencies
*/
Expand All @@ -27,11 +27,11 @@ export default function PageTitleView( { item }: { item: CommonPost } ) {
return (
<BaseTitleView item={ item } className="fields-field__page-title">
{ [ frontPageId, postsPageId ].includes( item.id as number ) && (
<span className="fields-field__page-title__badge">
<Badge>
{ item.id === frontPageId
? __( 'Homepage' )
: __( 'Posts Page' ) }
</span>
</Badge>
) }
</BaseTitleView>
);
Expand Down

0 comments on commit c552875

Please sign in to comment.