Improve badge truncation behavior
This commit is contained in:
parent
6738ffc28e
commit
3d461bac70
@ -19,6 +19,7 @@ export default function AdminTagBadge({
|
||||
'inline-flex items-center gap-2',
|
||||
// Fix nested EntityLink-in-Badge quirk for tags
|
||||
'[&>*>*:first-child]:items-center',
|
||||
isTagFavs(tag) && 'translate-y-[0.5px]',
|
||||
)}>
|
||||
{isTagFavs(tag)
|
||||
? <FavsTag />
|
||||
|
||||
@ -29,7 +29,7 @@ export default function Badge({
|
||||
case 'small':
|
||||
return clsx(
|
||||
'px-[5px] h-[17px] md:h-[18px]',
|
||||
'text-[0.7rem] font-medium rounded-[0.25rem]',
|
||||
'text-[0.7rem] leading-none font-medium rounded-[0.25rem]',
|
||||
contrast === 'high'
|
||||
? 'text-invert bg-invert'
|
||||
: contrast === 'frosted'
|
||||
@ -53,9 +53,7 @@ export default function Badge({
|
||||
className,
|
||||
)}>
|
||||
<span className={clsx(
|
||||
'max-w-full inline-flex',
|
||||
// Truncate 1 + 2 levels deep
|
||||
'truncate *:truncate',
|
||||
'max-w-full inline-block truncate',
|
||||
dimContent && 'opacity-50',
|
||||
)}>
|
||||
{children}
|
||||
|
||||
@ -33,7 +33,7 @@ export default function FavsTag({
|
||||
size={12}
|
||||
className={clsx(
|
||||
'text-amber-500',
|
||||
'translate-x-[-1px] translate-y-[-0.5px]',
|
||||
'translate-x-[-1px]',
|
||||
)}
|
||||
/>}
|
||||
type={type}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user