Skip to content

Commit

Permalink
fix: aligned reverse button size w/ figma (#310)
Browse files Browse the repository at this point in the history
aligned reverse button size w/ figma
  • Loading branch information
cartcrom authored Nov 29, 2022
1 parent ff5bacc commit 6349c00
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/Swap/Output.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const OutputWrapper = styled(FieldWrapper)<{ hasColor?: boolean | null }>`
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
margin-bottom: 0;
padding: 24px 0 20px 0;
padding: 1.75em 0 1.25em 0;
// Set transitions to reduce color flashes when switching color/token.
// When color loads, transition the background so that it transitions from the empty or last state, but not _to_ the empty state.
Expand Down
12 changes: 6 additions & 6 deletions src/components/Swap/ReverseButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useSwapInfo, useSwitchSwapCurrencies } from 'hooks/swap'
import { ArrowDown } from 'icons'
import { ArrowDown, LargeIcon } from 'icons'
import { transparentize } from 'polished'
import styled from 'styled-components/macro'
import { Layer } from 'theme'
Expand All @@ -8,18 +8,18 @@ import Button from '../Button'

const StyledReverseButton = styled(Button)`
align-items: center;
background-color: ${({ theme }) => theme.module};
background-color: ${({ theme }) => theme.interactive};
border: 4px solid;
border-color: ${({ theme }) => theme.container};
border-radius: ${({ theme }) => theme.borderRadius * 0.75}em;
border-radius: ${({ theme }) => theme.borderRadius}em;
display: flex;
height: 40px;
height: 48px;
justify-content: center;
left: 50%;
position: absolute;
transform: translate(-50%, -60%);
transition: 125ms ease background-color;
width: 40px;
width: 48px;
z-index: ${Layer.OVERLAY};
:hover {
background-color: ${({ theme }) => transparentize(0.2, theme.module)};
Expand All @@ -33,7 +33,7 @@ export default function ReverseButton() {

return (
<StyledReverseButton disabled={isDisabled} onClick={switchCurrencies}>
<ArrowDown />
<LargeIcon icon={ArrowDown} />
</StyledReverseButton>
)
}
1 change: 1 addition & 0 deletions src/components/Swap/Skeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const OutputColumn = styled(Column)`
background-color: ${({ theme }) => theme.module};
border-radius: ${({ theme }) => theme.borderRadius - 0.25}em;
display: flex;
padding-top: 0.25em;
`

const OutputInnerTopColumn = styled(Column)`
Expand Down
2 changes: 1 addition & 1 deletion src/theme/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const darkTheme: Colors = {
accent: brandDark,
container: 'hsl(225, 30%, 8%)',
module: 'hsl(222, 37%, 12%)',
interactive: 'hsl(224, 10%, 28%)',
interactive: 'hsl(223, 28%, 22%)',
outline: 'hsl(227, 10%, 37.5%)',
dialog: black,

Expand Down

1 comment on commit 6349c00

@vercel
Copy link

@vercel vercel bot commented on 6349c00 Nov 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

widgets – ./

widgets-seven-tau.vercel.app
widgets-uniswap.vercel.app
widgets-git-main-uniswap.vercel.app

Please sign in to comment.