Skip to content

Commit 3c73aa8

Browse files
committed
fix(templates): show description tagline on template cards
1 parent 95304b2 commit 3c73aa8

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

apps/sim/app/templates/components/template-card.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ interface TemplateCardProps {
2121
blocks?: string[]
2222
className?: string
2323
state?: WorkflowState
24+
description?: string | null
2425
isStarred?: boolean
2526
isVerified?: boolean
2627
}
@@ -124,6 +125,7 @@ function TemplateCardInner({
124125
blocks = [],
125126
className,
126127
state,
128+
description,
127129
isStarred = false,
128130
isVerified = false,
129131
}: TemplateCardProps) {
@@ -270,6 +272,12 @@ function TemplateCardInner({
270272
</div>
271273
</div>
272274

275+
{description && (
276+
<p className='mt-[4px] truncate pl-[2px] text-[12px] text-[var(--text-muted)]'>
277+
{description}
278+
</p>
279+
)}
280+
273281
<div className='mt-[10px] flex items-center justify-between'>
274282
<div className='flex min-w-0 items-center gap-[8px]'>
275283
{authorImageUrl ? (

apps/sim/app/templates/templates.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ export default function Templates({
196196
key={template.id}
197197
id={template.id}
198198
title={template.name}
199+
description={template.details?.tagline}
199200
author={template.creator?.name || 'Unknown'}
200201
authorImageUrl={template.creator?.profileImageUrl || null}
201202
usageCount={template.views.toString()}

apps/sim/app/workspace/[workspaceId]/templates/components/template-card.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ interface TemplateCardProps {
1818
blocks?: string[]
1919
className?: string
2020
state?: WorkflowState
21+
description?: string | null
2122
isStarred?: boolean
2223
isVerified?: boolean
2324
}
@@ -127,6 +128,7 @@ function TemplateCardInner({
127128
blocks = [],
128129
className,
129130
state,
131+
description,
130132
isStarred = false,
131133
isVerified = false,
132134
}: TemplateCardProps) {
@@ -277,6 +279,12 @@ function TemplateCardInner({
277279
</div>
278280
</div>
279281

282+
{description && (
283+
<p className='mt-[4px] truncate pl-[2px] text-[12px] text-[var(--text-tertiary)]'>
284+
{description}
285+
</p>
286+
)}
287+
280288
<div className='mt-[10px] flex items-center justify-between'>
281289
<div className='flex min-w-0 flex-1 items-center gap-[6px]'>
282290
{authorImageUrl ? (

apps/sim/app/workspace/[workspaceId]/templates/templates.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ export default function Templates({
222222
key={template.id}
223223
id={template.id}
224224
title={template.name}
225+
description={template.details?.tagline}
225226
author={template.creator?.name || 'Unknown'}
226227
authorImageUrl={template.creator?.profileImageUrl || null}
227228
usageCount={template.views.toString()}

0 commit comments

Comments
 (0)