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)}>
|
||||
{config.label}
|
||||
</span>
|
||||
{item.priority && (
|
||||
<span className={cn(
|
||||
'text-[9px] font-semibold px-1.5 py-0.5 rounded shrink-0',
|
||||
'text-[9px] font-semibold px-1.5 py-0.5 rounded shrink-0 w-10 text-center',
|
||||
item.priority === 'high' ? 'bg-red-500/10 text-red-400' :
|
||||
item.priority === 'medium' ? 'bg-yellow-500/10 text-yellow-400' :
|
||||
'bg-green-500/10 text-green-400'
|
||||
item.priority === 'low' ? 'bg-green-500/10 text-green-400' :
|
||||
'invisible'
|
||||
)}>
|
||||
{item.priority}
|
||||
{item.priority || ''}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user