Skip to content

Commit

Permalink
fix box in tooltip/popover
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoskolodny committed Oct 1, 2024
1 parent ffaedf7 commit 32d32e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {BaseTooltip} from './tooltip';
import Inline from './inline';
import Stack from './stack';
import {Text2, Text3} from './text';
import Box from './box';
import * as styles from './popover.css';
import {vars as skinVars} from './skins/skin-contract.css';
import {iconContainerSize} from './icon-button.css';
Expand Down Expand Up @@ -45,7 +44,7 @@ const Popover = ({
return (
<BaseTooltip
content={
<Box className={styles.content}>
<div className={styles.content}>
{(title || description || asset) && (
<div
style={{
Expand All @@ -67,7 +66,7 @@ const Popover = ({
)}

{extra ?? children}
</Box>
</div>
}
centerContent={false}
open={open}
Expand Down
5 changes: 2 additions & 3 deletions src/tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {useSetTooltipState, useTooltipState} from './tooltip-context-provider';
import {isRunningAcceptanceTest} from './utils/platform';
import {IconButton} from './icon-button';
import IconCloseRegular from './generated/mistica-icons/icon-close-regular';
import Box from './box';
import * as tokens from './text-tokens';

import type {BoundingRect} from './hooks';
Expand Down Expand Up @@ -619,15 +618,15 @@ const Tooltip = ({
return (
<BaseTooltip
content={
<Box className={styles.content}>
<div className={styles.content}>
{(title || description) && (
<Stack space={4}>
{title && <Text2 medium>{title}</Text2>}
{description && <Text2 regular>{description}</Text2>}
</Stack>
)}
{extra ?? children}
</Box>
</div>
}
centerContent={centerContent}
dataAttributes={{'component-name': 'Tooltip', ...dataAttributes}}
Expand Down

0 comments on commit 32d32e4

Please sign in to comment.