Skip to content

Commit 2deca97

Browse files
committed
Fixes brave/brave-browser#10757 - Specifies widget card toggle icon height/width
1 parent 003614d commit 2deca97

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

components/brave_new_tab_ui/components/default/settings/index.ts

+10
Original file line numberDiff line numberDiff line change
@@ -335,4 +335,14 @@ export const StyledButtonIcon = styled<{}, 'div'>('div')`
335335
display: inline-block;
336336
vertical-align: sub;
337337
margin-right: 5px;
338+
height: 20px;
339+
width: 20px;
340+
`
341+
342+
export const StyledButtonLabel = styled<{}, 'span'>('span')`
343+
max-width: 100px;
344+
text-overflow: ellipsis;
345+
display: inline-block;
346+
overflow: hidden;
347+
white-space: nowrap;
338348
`

components/brave_new_tab_ui/containers/newTab/settings/moreCards.tsx

+9-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ import {
1414
StyledWidgetToggle,
1515
SettingsWidget,
1616
StyledButtonIcon,
17-
StyledWidgetSettings
17+
StyledWidgetSettings,
18+
StyledButtonLabel
1819
} from '../../../components/default'
1920
import togetherBanner from './assets/bravetogether.png'
2021
import binanceBanner from './assets/binance.png'
@@ -55,11 +56,13 @@ class MoreCardsSettings extends React.PureComponent<Props, {}> {
5556
: <AddIcon />
5657
}
5758
</StyledButtonIcon>
58-
{
59-
on
60-
? getLocale('hideWidget')
61-
: getLocale('addWidget')
62-
}
59+
<StyledButtonLabel>
60+
{
61+
on
62+
? getLocale('hideWidget')
63+
: getLocale('addWidget')
64+
}
65+
</StyledButtonLabel>
6366
</StyledWidgetToggle>
6467
)
6568
}

0 commit comments

Comments
 (0)