feat: Add badge support to model specifications with TBadge type and schema

This commit is contained in:
Ruben Talstra 2025-02-22 12:38:12 +01:00
parent acafdb54c2
commit b50406ab9e
No known key found for this signature in database
GPG key ID: 2A5A7174A60F3BEA
2 changed files with 26 additions and 5 deletions

View file

@ -76,6 +76,19 @@ const MenuItem: FC<MenuItemProps> = ({
<div>
{title}
<div className="text-token-text-tertiary">{description}</div>
{spec.badges && spec.badges.length > 0 && (
<div className="mt-1 flex gap-2">
{spec.badges.map((badge, index) => (
<span
key={index}
className="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-semibold shadow-sm"
style={{ backgroundColor: badge.color, color: '#fff' }}
>
{badge.text}
</span>
))}
</div>
)}
</div>
</div>
</div>