Edited /components/Badge.tsx to be a block element

If the text for tags/cameras on the grid page overflowed to a second line then the background did not grow with the text. Making the element a block and slightly increasing the padding keeps the text/background similar to the original style while also allowing the background to match the text if it is multiple lines.
This commit is contained in:
Johnomated 2024-07-27 10:16:22 -05:00
parent 1b45eb41ae
commit b704a701c6

View File

@ -28,7 +28,9 @@ export default function Badge({
case 'small':
return clsx(
'h-max-baseline',
'px-[5px] py-[2.75px]',
// 'px-[5px] py-[2.75px]', //original padding
'block', // added to keep gray background around text when overflowed
'px-[6px] py-[5px]', // increased padding for block and to stop content shift
'text-[0.7rem] font-medium rounded-[0.25rem]',
highContrast
? 'text-invert bg-invert'