Skip to content

Commit fde9d74

Browse files
committed
Prevent ad text overflow. fix bg color
1 parent c2e5650 commit fde9d74

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cli/src/components/choice-ad-banner.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ export const ChoiceAdBanner: React.FC<ChoiceAdBannerProps> = ({ ads, onImpressio
7070
}
7171
}, [visibleAds, onImpression])
7272

73-
// Hover colors
7473
const hoverBorderColor = theme.link
75-
const hoverBgColor = theme.name === 'light' ? '#e8f0fe' : '#1a2332'
7674

7775
return (
7876
<box
@@ -111,10 +109,10 @@ export const ChoiceAdBanner: React.FC<ChoiceAdBannerProps> = ({ ads, onImpressio
111109
paddingLeft: 1,
112110
paddingRight: 1,
113111
flexDirection: 'column',
114-
backgroundColor: isHovered ? hoverBgColor : undefined,
112+
115113
}}
116114
>
117-
<box style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'flex-start' }}>
115+
<box style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'flex-start', height: MAX_DESC_LINES, overflow: 'hidden' }}>
118116
<text style={{ fg: theme.muted, flexShrink: 1 }}>
119117
{truncateToLines(ad.adText, widths[i] - 8, MAX_DESC_LINES)}
120118
</text>

0 commit comments

Comments
 (0)