Skip to content

Commit fabc333

Browse files
fix(website): center svg icon on review card (#6611)
Resolves #6612 svg icon not centered. Before: <img width="350" height="132" alt="iTerm2 2026-06-03 11 30 54" src="https://github.com/user-attachments/assets/4054f96b-68a7-4aa7-b6fc-06af33e825c8" /> After: <img width="182" height="62" alt="Google Chrome 2026-06-03 11 36 06" src="https://github.com/user-attachments/assets/244a0841-c557-4a13-942f-009f76d5a152" /> Also fixes that we add the literal css class `undefined` when `extraStyle` is not passed to `KeyValueComponent` (and hence `undefined`) on the review page. 🚀 Preview: https://fix-undefined-style.loculus.org
1 parent 1129540 commit fabc333

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

website/src/components/ReviewPage/ReviewCard.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,18 +461,21 @@ const KeyValueComponent: FC<KeyValueComponentProps> = ({
461461
return (
462462
<div className={`flex flex-col m-2 `}>
463463
<span className={keyStyle ?? 'text-gray-500 uppercase text-xs'}>{keyName}</span>
464-
<span className={`text-base ${extraStyle}`}>
464+
<span className={`text-base ${extraStyle ?? ''}`}>
465465
<span
466466
ref={textRef}
467-
className={`${textColor} ${disableTruncate ? '' : 'truncate max-w-xs inline-block'}`}
467+
className={`${textColor} ${disableTruncate ? '' : 'truncate max-w-xs inline-block align-middle'}`}
468468
data-tooltip-id={showTooltip ? textTooltipId : undefined}
469469
>
470470
{value}
471471
</span>
472472
{showTooltip && <CustomTooltip id={textTooltipId} content={tooltipContent} />}
473473
{secondaryMessages !== undefined && (
474474
<>
475-
<Note className='text-yellow-500 inline-block' data-tooltip-id={noteTooltipId} />
475+
<Note
476+
className='text-yellow-500 inline-block align-middle ml-1'
477+
data-tooltip-id={noteTooltipId}
478+
/>
476479
<CustomTooltip
477480
id={noteTooltipId}
478481
content={secondaryMessages.map((annotation) => annotation.message).join(', ')}

0 commit comments

Comments
 (0)