Skip to content

Commit 7e80e44

Browse files
committed
fix(popover): fix display of title in popover with close button
1 parent 7cbca97 commit 7e80e44

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

packages/fractal/src/components/Popover/Popover.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,20 +297,27 @@ export const Popover = forwardRef<CombinedRefs, PopoverProps>(
297297
{(withCloseButton || !isEmpty(title)) && (
298298
<div
299299
className={cj(
300-
'flex flex-row items-center justify-between',
301-
!isEmpty(title) ? 'mb-1' : '',
300+
'flex flex-row items-center justify-between gap-1',
301+
!isEmpty(title) ? 'mb-2' : '',
302302
)}
303303
>
304304
{!isEmpty(title) && (
305-
<Typography variant="body-1-bold">{title}</Typography>
305+
<Typography className="w-full" variant="body-1-bold">
306+
{title}
307+
</Typography>
306308
)}
307309

308310
{withCloseButton && (
309311
<RxPopover.Close
310312
asChild
311313
className={cj(`${PREFIX}-${GROUP_NAME}__close`)}
312314
>
313-
<div className="mt-half flex size-full items-center justify-end text-right">
315+
<div
316+
className={cj(
317+
'flex items-center justify-end text-right',
318+
isEmpty(title) ? 'w-full' : '',
319+
)}
320+
>
314321
<Button
315322
icon={<CloseIcon />}
316323
iconOnly

0 commit comments

Comments
 (0)