Skip to content

Commit 1c10755

Browse files
authored
fix: align icon if texthight < 24px (#1271)
1 parent e0b1225 commit 1c10755

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

packages/dos-donts-block/src/DoDontItem.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ export const DoDontItem = memo((props: DoDontItemProps) => {
317317
)}
318318
<div
319319
data-test-id="dos-donts-heading"
320-
className="tw-flex tw-items-start tw-font-semibold tw-text-l"
320+
className="tw-flex tw-items-start tw-font-semibold"
321321
style={{ color: headingColor }}
322322
>
323323
{style === DoDontStyle.Icons && (title || hasRichTextValue(body) || editing) && (
@@ -328,7 +328,7 @@ export const DoDontItem = memo((props: DoDontItemProps) => {
328328
fontSize: 'var(--f-theme-settings-heading3-font-size)',
329329
}}
330330
className={joinClassNames([
331-
'tw-mr-2 tw-w-auto tw-flex tw-items-center tw-min-h-[1lh] tw-flex-shrink-0',
331+
'tw-mr-2 tw-w-auto tw-flex tw-items-center tw-h-[1lh] tw-flex-shrink-0',
332332
!title ? 'tw-opacity-70' : '',
333333
])}
334334
>
@@ -344,7 +344,14 @@ export const DoDontItem = memo((props: DoDontItemProps) => {
344344
</div>
345345
)}
346346

347-
<div className="tw-min-w-0 tw-flex-1">{renderTitle()}</div>
347+
<span
348+
style={{
349+
lineHeight: 'var(--f-theme-settings-heading3-line-height)',
350+
fontSize: 'var(--f-theme-settings-heading3-font-size)',
351+
}}
352+
>
353+
{renderTitle()}
354+
</span>
348355
</div>
349356
{style === DoDontStyle.Underline && (
350357
<hr

0 commit comments

Comments
 (0)