Fix upcoming widget row alignment with consistent priority column
The priority badge was conditionally rendered, causing rows without priority to have fewer flex children and shifting the date/type columns. Now always renders a fixed-width priority slot (invisible when empty). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e74d4cf7c6
commit
7d4089762e
@ -56,16 +56,15 @@ export default function UpcomingWidget({ items, days = 7 }: UpcomingWidgetProps)
|
|||||||
<span className={cn('text-[9px] font-semibold uppercase tracking-wider shrink-0 w-14 text-right', config.color)}>
|
<span className={cn('text-[9px] font-semibold uppercase tracking-wider shrink-0 w-14 text-right', config.color)}>
|
||||||
{config.label}
|
{config.label}
|
||||||
</span>
|
</span>
|
||||||
{item.priority && (
|
<span className={cn(
|
||||||
<span className={cn(
|
'text-[9px] font-semibold px-1.5 py-0.5 rounded shrink-0 w-10 text-center',
|
||||||
'text-[9px] font-semibold px-1.5 py-0.5 rounded shrink-0',
|
item.priority === 'high' ? 'bg-red-500/10 text-red-400' :
|
||||||
item.priority === 'high' ? 'bg-red-500/10 text-red-400' :
|
item.priority === 'medium' ? 'bg-yellow-500/10 text-yellow-400' :
|
||||||
item.priority === 'medium' ? 'bg-yellow-500/10 text-yellow-400' :
|
item.priority === 'low' ? 'bg-green-500/10 text-green-400' :
|
||||||
'bg-green-500/10 text-green-400'
|
'invisible'
|
||||||
)}>
|
)}>
|
||||||
{item.priority}
|
{item.priority || ''}
|
||||||
</span>
|
</span>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user