Skip to content

Commit d4078df

Browse files
CopilotomBratteng
andcommitted
Fix text wrapping in ProfilePreviewToggle to prevent toggle overflow
Co-authored-by: omBratteng <1681525+omBratteng@users.noreply.github.com>
1 parent 4a07ec6 commit d4078df

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

packages/shared/src/components/profile/ProfilePreviewToggle.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,24 @@ export function ProfilePreviewToggle({
2424
return (
2525
<div
2626
className={classNames(
27-
'flex items-center justify-between rounded-16 border border-border-subtlest-tertiary bg-surface-float p-4',
27+
'flex items-start gap-3 rounded-16 border border-border-subtlest-tertiary bg-surface-float p-4',
2828
className,
2929
)}
3030
>
31-
<div className="flex items-center gap-3">
31+
<div className="flex min-w-0 flex-1 items-center gap-3">
3232
<EyeIcon
3333
size={IconSize.Medium}
34-
className="text-text-tertiary"
34+
className="shrink-0 text-text-tertiary"
3535
secondary
3636
/>
37-
<div className="flex flex-col gap-0.5">
37+
<div className="flex min-w-0 flex-1 flex-col gap-0.5">
3838
<Typography type={TypographyType.Body} bold>
3939
Preview mode
4040
</Typography>
4141
<Typography
4242
type={TypographyType.Footnote}
4343
color={TypographyColor.Tertiary}
44+
className="break-words"
4445
>
4546
See how your profile looks to others
4647
</Typography>
@@ -52,6 +53,7 @@ export function ProfilePreviewToggle({
5253
checked={isPreviewMode}
5354
onToggle={onToggle}
5455
compact={false}
56+
className="shrink-0"
5557
/>
5658
</div>
5759
);

0 commit comments

Comments
 (0)