Skip to content

Commit

Permalink
revert: "fix: mini portfolio layout fixes" (Uniswap#6279)
Browse files Browse the repository at this point in the history
Revert "fix: mini portfolio layout fixes (Uniswap#6260)"

This reverts commit fb05439.
  • Loading branch information
cmcewen authored Mar 30, 2023
1 parent 4eaf16b commit 120ad93
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/components/WalletDropdown/AuthenticatedHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import MiniPortfolio from './MiniPortfolio'
import { portfolioFadeInAnimation } from './MiniPortfolio/PortfolioRow'

const AuthenticatedHeaderWrapper = styled.div`
padding: 20px 16px;
padding: 14px 12px 16px 16px;
display: flex;
flex-direction: column;
flex: 1;
Expand Down
31 changes: 16 additions & 15 deletions src/components/WalletDropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,22 +76,16 @@ const WalletDropdownScrollWrapper = styled.div`
border-radius: 12px;
`

const Wrapper = styled.div`
display: flex;
flex-direction: row;
height: calc(100% - 2 * ${DRAWER_MARGIN});
overflow: hidden;
const WalletDropdownWrapper = styled.div<{ open: boolean }>`
position: fixed;
right: ${DRAWER_MARGIN};
top: ${DRAWER_MARGIN};
right: ${({ open }) => (open ? DRAWER_MARGIN : '-' + DRAWER_WIDTH)};
z-index: ${Z_INDEX.fixed};
`
const WalletDropdownWrapper = styled.div<{ open: boolean }>`
margin-right: ${({ open }) => (open ? 0 : '-' + DRAWER_WIDTH)};
height: 100%;
overflow: hidden;
height: calc(100% - 2 * ${DRAWER_MARGIN});
@media only screen and (max-width: ${({ theme }) => `${theme.breakpoint.sm}px`}) {
z-index: ${Z_INDEX.modal};
top: unset;
Expand All @@ -107,7 +101,7 @@ const WalletDropdownWrapper = styled.div<{ open: boolean }>`
}
@media screen and (min-width: 1440px) {
margin-right: ${({ open }) => (open ? 0 : '-' + DRAWER_WIDTH_XL)};
right: ${({ open }) => (open ? DRAWER_MARGIN : '-' + DRAWER_WIDTH_XL)};
width: ${DRAWER_WIDTH_XL};
}
Expand All @@ -118,7 +112,7 @@ const WalletDropdownWrapper = styled.div<{ open: boolean }>`
border: ${({ theme }) => `1px solid ${theme.backgroundOutline}`};
box-shadow: ${({ theme }) => theme.deepShadow};
transition: margin-right ${({ theme }) => theme.transition.duration.medium},
transition: right ${({ theme }) => theme.transition.duration.medium},
bottom ${({ theme }) => theme.transition.duration.medium};
`

Expand All @@ -129,7 +123,11 @@ const CloseIcon = styled(ChevronsRight).attrs({ size: 24 })`
const CloseDrawer = styled.div`
${ClickableStyle}
cursor: pointer;
height: 100%;
height: calc(100% - 2 * ${DRAWER_MARGIN});
position: fixed;
right: calc(${DRAWER_MARGIN} + ${DRAWER_WIDTH} - ${DRAWER_OFFSET});
top: 4px;
z-index: ${Z_INDEX.dropdown};
// When the drawer is not hovered, the icon should be 18px from the edge of the sidebar.
padding: 24px calc(18px + ${DRAWER_OFFSET}) 24px 14px;
border-radius: 20px 0 0 20px;
Expand All @@ -142,6 +140,9 @@ const CloseDrawer = styled.div`
@media only screen and (max-width: ${({ theme }) => `${theme.breakpoint.sm}px`}) {
display: none;
}
@media screen and (min-width: 1440px) {
right: calc(${DRAWER_MARGIN} + ${DRAWER_WIDTH_XL} - ${DRAWER_OFFSET});
}
`

function WalletDropdown() {
Expand Down Expand Up @@ -186,7 +187,7 @@ function WalletDropdown() {
}, [walletDrawerOpen, toggleWalletDrawer])

return (
<Wrapper>
<>
{walletDrawerOpen && (
<TraceEvent
events={[BrowserEvent.onClick]}
Expand All @@ -205,7 +206,7 @@ function WalletDropdown() {
<DefaultMenu />
</WalletDropdownScrollWrapper>
</WalletDropdownWrapper>
</Wrapper>
</>
)
}

Expand Down

0 comments on commit 120ad93

Please sign in to comment.