mirror of
https://github.com/simstudioai/sim.git
synced 2026-10-28 02:41:36 +08:00
* improvement(landing, blog): SEO and GEO optimization * improvement(docs): ui/ux cleanup * chore(blog): remove unused buildBlogJsonLd export and wordCount schema field * fix(blog): stack related posts vertically on mobile and fill all suggestion slots - Add flex-col sm:flex-row and matching border classes to related posts nav for consistent mobile stacking with the main blog page - Remove score > 0 filter in getRelatedPosts so it falls back to recent posts when there aren't enough tag matches - Align description text color with main page cards
32 lines
786 B
TypeScript
32 lines
786 B
TypeScript
'use client'
|
|
|
|
import type * as React from 'react'
|
|
import { blockTypeToIconMap } from '@/components/ui/icon-mapping'
|
|
|
|
interface BlockInfoCardProps {
|
|
type: string
|
|
color: string
|
|
icon?: React.ComponentType<{ className?: string }>
|
|
}
|
|
|
|
export function BlockInfoCard({
|
|
type,
|
|
color,
|
|
icon: IconComponent,
|
|
}: BlockInfoCardProps): React.ReactNode {
|
|
const ResolvedIcon = IconComponent || blockTypeToIconMap[type] || null
|
|
|
|
return (
|
|
<div
|
|
className='mb-6 flex items-center justify-center overflow-hidden rounded-lg p-8'
|
|
style={{ background: color }}
|
|
>
|
|
{ResolvedIcon ? (
|
|
<ResolvedIcon className='h-10 w-10 text-white' />
|
|
) : (
|
|
<div className='font-mono text-white text-xl opacity-70'>{type.substring(0, 2)}</div>
|
|
)}
|
|
</div>
|
|
)
|
|
}
|