Skip to content

Commit

Permalink
Reposition pattern detail icon (#59363)
Browse files Browse the repository at this point in the history
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: huzaifaalmesbah <huzaifaalmesbah@git.wordpress.org>
  • Loading branch information
5 people committed Feb 27, 2024
1 parent b3f5174 commit 7b61388
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions packages/edit-site/src/components/page-patterns/index.js
Expand Up @@ -210,6 +210,26 @@ function Title( { item, categoryId } ) {
}
return (
<HStack alignment="center" justify="flex-start" spacing={ 2 }>
<Flex
as="div"
gap={ 0 }
justify="left"
className="edit-site-patterns__pattern-title"
>
{ item.type === PATTERN_TYPES.theme ? (
item.title
) : (
<Button
variant="link"
onClick={ onClick }
// Required for the grid's roving tab index system.
// See https://github.com/WordPress/gutenberg/pull/51898#discussion_r1243399243.
tabIndex="-1"
>
{ item.title || item.name }
</Button>
) }
</Flex>
{ itemIcon && ! isNonUserPattern && (
<Tooltip
placement="top"
Expand All @@ -235,26 +255,6 @@ function Title( { item, categoryId } ) {
/>
</Tooltip>
) }
<Flex
as="div"
gap={ 0 }
justify="left"
className="edit-site-patterns__pattern-title"
>
{ item.type === PATTERN_TYPES.theme ? (
item.title
) : (
<Button
variant="link"
onClick={ onClick }
// Required for the grid's roving tab index system.
// See https://github.com/WordPress/gutenberg/pull/51898#discussion_r1243399243.
tabIndex="-1"
>
{ item.title || item.name }
</Button>
) }
</Flex>
</HStack>
);
}
Expand Down

0 comments on commit 7b61388

Please sign in to comment.