Skip to content

Commit

Permalink
add classNameto BaseTitleView
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras committed Dec 2, 2024
1 parent b8e1ea1 commit c64ee8b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/fields/src/fields/pattern-title/style.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.fields-title-field span:first-child {
.fields-pattern-title-field span:first-child {
flex: 1;
}
2 changes: 1 addition & 1 deletion packages/fields/src/fields/pattern-title/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const { PATTERN_TYPES } = unlock( patternPrivateApis );

export default function PatternTitleView( { item }: { item: CommonPost } ) {
return (
<BaseTitleView item={ item }>
<BaseTitleView item={ item } className="fields-pattern-title-field">
{ item.type === PATTERN_TYPES.theme && (
<Tooltip
placement="top"
Expand Down
5 changes: 4 additions & 1 deletion packages/fields/src/fields/title/view.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* External dependencies
*/
import clsx from 'clsx';
import type { ReactNode } from 'react';

/**
Expand All @@ -17,15 +18,17 @@ import { getItemTitle } from '../../actions/utils';

export function BaseTitleView( {
item,
className,
children,
}: {
item: CommonPost;
className?: string;
children?: ReactNode;
} ) {
const renderedTitle = getItemTitle( item );
return (
<HStack
className="fields-title-field"
className={ clsx( 'fields-title-field', className ) }
alignment="center"
justify="flex-start"
>
Expand Down

0 comments on commit c64ee8b

Please sign in to comment.