Skip to content

Commit

Permalink
re-instate descriptions but only show as a tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskoster authored and ntsekouras committed Jun 23, 2023
1 parent 63018ee commit 8401e7a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions packages/edit-site/src/components/add-new-template/new-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,18 @@ function TemplateListItem( {
direction,
className,
description,
hideDescription = true,
icon,
onClick,
showTooltip = true,
} ) {
return (
<Button className={ className } onClick={ onClick }>
<Button
className={ className }
onClick={ onClick }
label={ description }
showTooltip={ showTooltip }
>
<Flex
as="span"
spacing={ 2 }
Expand All @@ -125,7 +132,7 @@ function TemplateListItem( {
>
{ title }
</Text>
{ description && (
{ description && ! hideDescription && (
<Text
lineHeight={ 1.53846153846 } // 20px
>
Expand Down Expand Up @@ -331,6 +338,8 @@ export default function NewTemplate( {
description={ __(
'A custom template can be manually applied to any post or page.'
) }
hideDescription={ false }
showTooltip={ false }
icon={ edit }
onClick={ () =>
setModalContent(
Expand Down

0 comments on commit 8401e7a

Please sign in to comment.