Skip to content

Commit

Permalink
Fixes brave/brave-browser#11445 - Fixes Gemini widget connect button …
Browse files Browse the repository at this point in the history
…for long translations
  • Loading branch information
ryanml authored and deeppandya committed Oct 7, 2020
1 parent c030664 commit 2080e85
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
11 changes: 6 additions & 5 deletions components/brave_new_tab_ui/components/default/gemini/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ import {
TradeInfoItem,
TradeItemLabel,
TradeValue,
StyledParty
StyledParty,
SmallButton
} from './style'
import {
SearchIcon,
Expand Down Expand Up @@ -732,9 +733,9 @@ class Gemini extends React.PureComponent<Props, State> {
<InvalidTitle>
{`${getLocale(actionLabel)} ${quantity} ${currentTradeAsset}!`}
</InvalidTitle>
<ConnectButton isSmall={true} onClick={this.finishTrade}>
<SmallButton onClick={this.finishTrade}>
{getLocale('geminiWidgetContinue')}
</ConnectButton>
</SmallButton>
</InvalidWrapper>
)
}
Expand Down Expand Up @@ -780,9 +781,9 @@ class Gemini extends React.PureComponent<Props, State> {
</TradeInfoItem>
</TradeInfoWrapper>
<ActionsWrapper>
<ConnectButton isSmall={true} onClick={this.processTrade}>
<SmallButton onClick={this.processTrade}>
{`${getLocale('geminiWidgetConfirm')} (${currentTradeExpiryTime}s)`}
</ConnectButton>
</SmallButton>
<DismissAction onClick={this.cancelTrade}>
{getLocale('geminiWidgetCancel')}
</DismissAction>
Expand Down
12 changes: 8 additions & 4 deletions components/brave_new_tab_ui/components/default/gemini/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,25 +90,29 @@ export const ActionsWrapper = styled<StyleProps, 'div'>('div')`
text-align: center;
`

export const ConnectButton = styled<StyleProps, 'a'>('a')`
export const ConnectButton = styled<StyleProps, 'button'>('button')`
font-size: 14px;
font-weight: bold;
border-radius: 20px;
width: 100%;
background: #3D3D3D;
border: 0;
padding: 10px 60px;
padding: 10px;
cursor: pointer;
color: #fff;
margin-bottom: 10px;
text-decoration: none;
width: ${p => p.isSmall ? 50 : 100}%;
min-width: 245px;
&:focus {
outline: 0;
}
`

export const SmallButton = styled(ConnectButton)`
width: 50%;
margin-bottom: 10px;
`

export const NavigationBar = styled<{}, 'div'>('div')`
height: 30px;
margin-top: 15px;
Expand Down

0 comments on commit 2080e85

Please sign in to comment.