Skip to content

Commit

Permalink
Merge pull request #12227 from brave/fix-reset-button-alignment
Browse files Browse the repository at this point in the history
Fix alignment of reset button
  • Loading branch information
muliswilliam authored Feb 14, 2022
2 parents 68ba250 + 7bca94d commit b599acc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import { NavButton } from '../../extension'
import SwapInputComponent from '../swap-input-component'
import { getLocale } from '../../../../common/locale'
import { ButtonRow, ErrorText, ResetButton } from '../shared-styles'
import { ErrorText, ResetButton } from '../shared-styles'
// Styled Components
import {
StyledWrapper
Expand Down Expand Up @@ -103,7 +103,6 @@ function Send (props: Props) {
{insuficientFundsError &&
<ErrorText>{getLocale('braveWalletSwapInsufficientBalance')}</ErrorText>
}
<ButtonRow>
<NavButton
disabled={addressError !== '' ||
toAddressOrUrl === '' ||
Expand All @@ -122,7 +121,6 @@ function Send (props: Props) {
>
{getLocale('braveWalletReset')}
</ResetButton>
</ButtonRow>
</StyledWrapper>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,6 @@ export const DividerText = styled.span`
color: ${(p) => p.theme.color.text01};
`

export const ButtonRow = styled.div`
display: flex;
align-items: center;
justify-content: space-between;
flex-direction: row;
width: 100%;
margin-bottom: 14px;
`

export const ResetButton = styled(WalletButton)`
display: flex;
flex-direction: row;
Expand All @@ -103,6 +94,7 @@ export const ResetButton = styled(WalletButton)`
letter-spacing: 0.01em;
padding: 2px 0px;
width: 48px;
margin: 12px 0px;
background-color: ${(p) => p.theme.palette.white};
color: ${(p) => p.theme.color.interactive05};
@media (prefers-color-scheme: dark) {
Expand Down
28 changes: 11 additions & 17 deletions components/brave_wallet_ui/components/buy-send-swap/swap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ import {
SwapDisclaimerRow,
AlertIcon,
SwapFeesNoticeRow,
SwapFeesNoticeText,
ResetRow
SwapFeesNoticeText
} from './style'
import { LoaderIcon } from 'brave-ui/components/icons'
import { ResetButton } from '../shared-styles'
Expand Down Expand Up @@ -198,21 +197,6 @@ function Swap (props: Props) {
customSlippageTolerance={customSlippageTolerance}
onCustomSlippageToleranceChange={onCustomSlippageToleranceChange}
/>

<ResetRow>
<ResetButton
onClick={onReset}
>
{getLocale('braveWalletReset')}
</ResetButton>
</ResetRow>

<SwapFeesNoticeRow>
<SwapFeesNoticeText>
{getLocale('braveWalletSwapFeesNotice')}
</SwapFeesNoticeText>
</SwapFeesNoticeRow>

<SwapNavButton
disabled={isSubmitDisabled}
buttonType='primary'
Expand All @@ -224,6 +208,16 @@ function Swap (props: Props) {
: <SwapButtonText>{submitText}</SwapButtonText>
}
</SwapNavButton>
<ResetButton
onClick={onReset}
>
{getLocale('braveWalletReset')}
</ResetButton>
<SwapFeesNoticeRow>
<SwapFeesNoticeText>
{getLocale('braveWalletSwapFeesNotice')}
</SwapFeesNoticeText>
</SwapFeesNoticeRow>
<SwapDisclaimerRow>
<SwapDisclaimerText>
{beforeTag}
Expand Down

0 comments on commit b599acc

Please sign in to comment.