11import React from 'react'
2- import { BookIcon } from 'lucide-react'
32import {
4- Tag ,
5- type TagProps ,
3+ SubBlockRow ,
4+ type SubBlockRowProps ,
65} from '@/app/(landing)/components/hero/components/landing-canvas/landing-block/tag'
76
87/**
98 * Data structure for a landing card component
9+ * Matches the workflow block structure from the application
1010 */
1111export interface LandingCardData {
1212 /** Icon element to display in the card header */
@@ -15,8 +15,8 @@ export interface LandingCardData {
1515 color : string | '#f6f6f6'
1616 /** Name/title of the card */
1717 name : string
18- /** Optional tags to display at the bottom of the card */
19- tags ?: TagProps [ ]
18+ /** Optional subblock rows to display below the header */
19+ tags ?: SubBlockRowProps [ ]
2020}
2121
2222/**
@@ -28,7 +28,8 @@ export interface LandingBlockProps extends LandingCardData {
2828}
2929
3030/**
31- * Landing block component that displays a card with icon, name, and optional tags
31+ * Landing block component that displays a card with icon, name, and optional subblock rows
32+ * Styled to match the application's workflow blocks
3233 * @param props - Component properties including icon, color, name, tags, and className
3334 * @returns A styled block card component
3435 */
@@ -39,33 +40,37 @@ export const LandingBlock = React.memo(function LandingBlock({
3940 tags,
4041 className,
4142} : LandingBlockProps ) {
43+ const hasContentBelowHeader = tags && tags . length > 0
44+
4245 return (
4346 < div
44- className = { `z-10 flex w-64 flex-col items-start gap-3 rounded-[14px] border border-[#E5E5E5] bg-[#FEFEFE] p-3 ${ className ?? '' } ` }
45- style = { {
46- boxShadow : '0 1px 2px 0 rgba(0, 0, 0, 0.05)' ,
47- } }
47+ className = { `z-10 flex w-[250px] flex-col rounded-[8px] border border-[#E5E5E5] bg-white ${ className ?? '' } ` }
4848 >
49- < div className = 'flex w-full items-center justify-between' >
50- < div className = 'flex items-center gap-2.5' >
49+ { /* Header - matches workflow-block.tsx header styling */ }
50+ < div
51+ className = { `flex items-center justify-between p-[8px] ${ hasContentBelowHeader ? 'border-[#E5E5E5] border-b' : '' } ` }
52+ >
53+ < div className = 'flex min-w-0 flex-1 items-center gap-[10px]' >
5154 < div
52- className = 'flex h-6 w-6 items-center justify-center rounded-[8px] text-white '
53- style = { { backgroundColor : color as string } }
55+ className = 'flex h-[24px] w-[24px] flex-shrink-0 items-center justify-center rounded-[6px] '
56+ style = { { background : color as string } }
5457 >
5558 { icon }
5659 </ div >
57- < p className = 'text-base text-card-foreground' > { name } </ p >
60+ < span className = 'truncate font-medium text-[#171717] text-[16px]' title = { name } >
61+ { name }
62+ </ span >
5863 </ div >
59- < BookIcon className = 'h-4 w-4 text-muted-foreground' />
6064 </ div >
6165
62- { tags && tags . length > 0 ? (
63- < div className = 'flex flex-wrap gap-2' >
66+ { /* Content - SubBlock Rows matching workflow-block.tsx */ }
67+ { hasContentBelowHeader && (
68+ < div className = 'flex flex-col gap-[8px] p-[8px]' >
6469 { tags . map ( ( tag ) => (
65- < Tag key = { tag . label } icon = { tag . icon } label = { tag . label } />
70+ < SubBlockRow key = { tag . label } icon = { tag . icon } label = { tag . label } />
6671 ) ) }
6772 </ div >
68- ) : null }
73+ ) }
6974 </ div >
7075 )
7176} )
0 commit comments