Skip to content

Commit a3a2a71

Browse files
author
André Luiz
authored
fix: improve icon layout in Section using float-based positioning (#1852)
* feat: improve icon layout in Section using float-based positioning Closes #1433 * fix: move rightIcon after title in float-based Section layout
1 parent 272cb36 commit a3a2a71

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

dashboard/src/components/Section/Section.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,18 @@ const Section = ({
128128
<div className="text-dim-gray mb-6 flex flex-col gap-4">
129129
<div className="flex flex-col gap-2">
130130
{eyebrow && <span className="text-sm">{eyebrow}</span>}
131-
<div className="flex flex-row items-center gap-2">
132-
{leftIcon}
131+
<div className="overflow-hidden">
132+
{leftIcon && (
133+
<span className="float-left mr-2 -mb-2 [&_svg]:h-8 [&_svg]:w-8">
134+
{leftIcon}
135+
</span>
136+
)}
133137
{title && (
134138
<span className="max-w-full text-2xl font-bold break-all">
135139
{title}
136140
</span>
137141
)}
138-
{rightIcon}
142+
{rightIcon && <span className="ml-1 sm:ml-2">{rightIcon}</span>}
139143
</div>
140144
{subtitle}
141145
</div>

0 commit comments

Comments
 (0)