Skip to content

Commit c0e4f15

Browse files
committed
feat(topology): legend grid with fixed 50px column gaps and side padding (#1384)
1 parent 9bb0957 commit c0e4f15

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎app/src/components/topology/LegendCard.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export function LegendContent({ model, compact = false, horizontal = false }: {
126126
}
127127
let i = 0
128128
return (
129-
<div className={cn(horizontal ? 'flex flex-wrap gap-x-[50px] gap-y-4' : 'space-y-4', compact && 'space-y-3')}>
129+
<div className={cn(horizontal ? 'grid grid-cols-4 gap-x-[50px] gap-y-4' : 'space-y-4', compact && 'space-y-3')}>
130130
<div>
131131
<div className="mb-2 text-label uppercase text-text-muted">{t('topology.legend.bandConnection')}</div>
132132
<ul className="grid grid-cols-2 gap-x-4 gap-y-2">
@@ -142,7 +142,7 @@ export function LegendContent({ model, compact = false, horizontal = false }: {
142142
</motion.li>
143143
</ul>
144144
</div>
145-
<div>
145+
<div className={cn(horizontal && 'col-span-2')}>
146146
<div className="mb-2 text-label uppercase text-text-muted">{t('topology.links.title')}</div>
147147
<ul className={cn('grid gap-x-4 gap-y-2', horizontal ? 'grid-cols-3' : 'grid-cols-1')}>
148148
<motion.li className="flex items-center gap-2 text-sm text-text-secondary" {...row(i++)}>
@@ -183,7 +183,7 @@ export function LegendContent({ model, compact = false, horizontal = false }: {
183183
</ul>
184184
</div>
185185
<motion.p
186-
className={cn('border-t border-border pt-3 text-caption text-text-muted', horizontal && 'w-full')}
186+
className={cn('border-t border-border pt-3 text-caption text-text-muted', horizontal && 'col-span-full')}
187187
{...row(i++)}
188188
>
189189
{t('topology.legend.summary', { online: deviceTotals.online, peers: activePeerCount, links: activeLinkCount })}

0 commit comments

Comments
 (0)