Commit 0aafcdf8 authored by gnewfield's avatar gnewfield Committed by GitHub

fix: change style of mobile pool buttons and menu (#7020)

* fix: menu flyout alignment overridden on mobile

* fix: change button order, sizing

* Replace deprecated media queries and text components
parent f55062f9
...@@ -53,11 +53,6 @@ const MenuFlyout = styled.span<{ flyoutAlignment?: FlyoutAlignment }>` ...@@ -53,11 +53,6 @@ const MenuFlyout = styled.span<{ flyoutAlignment?: FlyoutAlignment }>`
: css` : css`
left: 0rem; left: 0rem;
`}; `};
${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
bottom: unset;
right: 0;
left: unset;
`};
` `
const MenuItem = styled(ExternalLink)` const MenuItem = styled(ExternalLink)`
......
...@@ -29,49 +29,41 @@ const PageWrapper = styled(AutoColumn)` ...@@ -29,49 +29,41 @@ const PageWrapper = styled(AutoColumn)`
max-width: 870px; max-width: 870px;
width: 100%; width: 100%;
${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium` @media (max-width: ${({ theme }) => `${theme.breakpoint.md}px`}) {
max-width: 800px; max-width: 800px;
`};
${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
max-width: 500px;
`};
@media only screen and (max-width: ${({ theme }) => `${theme.breakpoint.md}px`}) {
padding-top: 48px; padding-top: 48px;
} }
@media only screen and (max-width: ${({ theme }) => `${theme.breakpoint.sm}px`}) { @media (max-width: ${({ theme }) => `${theme.breakpoint.sm}px`}) {
max-width: 500px;
padding-top: 20px; padding-top: 20px;
} }
` `
const TitleRow = styled(RowBetween)` const TitleRow = styled(RowBetween)`
color: ${({ theme }) => theme.textSecondary}; color: ${({ theme }) => theme.textSecondary};
${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall` @media (max-width: ${({ theme }) => `${theme.breakpoint.sm}px`}) {
flex-wrap: wrap; flex-wrap: wrap;
gap: 12px; gap: 12px;
width: 100%; width: 100%;
`}; }
` `
const ButtonRow = styled(RowFixed)` const ButtonRow = styled(RowFixed)`
& > *:not(:last-child) { & > *:not(:last-child) {
margin-left: 8px; margin-left: 8px;
} }
${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall` @media (max-width: ${({ theme }) => `${theme.breakpoint.sm}px`}) {
width: 100%; width: 100%;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
flex-direction: row-reverse; }
`};
` `
const PoolMenu = styled(Menu)` const PoolMenu = styled(Menu)`
margin-left: 0; margin-left: 0;
${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall` @media (max-width: ${({ theme }) => `${theme.breakpoint.sm}px`}) {
flex: 1 1 auto; flex: 1 1 auto;
width: 49%; width: 50%;
right: 0px; }
`};
a { a {
width: 100%; width: 100%;
...@@ -93,7 +85,7 @@ const MoreOptionsButton = styled(ButtonGray)` ...@@ -93,7 +85,7 @@ const MoreOptionsButton = styled(ButtonGray)`
margin-right: 8px; margin-right: 8px;
` `
const MoreOptionsText = styled(ThemedText.DeprecatedBody)` const MoreOptionsText = styled(ThemedText.BodyPrimary)`
align-items: center; align-items: center;
display: flex; display: flex;
` `
...@@ -127,10 +119,10 @@ const ResponsiveButtonPrimary = styled(ButtonPrimary)` ...@@ -127,10 +119,10 @@ const ResponsiveButtonPrimary = styled(ButtonPrimary)`
font-size: 16px; font-size: 16px;
padding: 6px 8px; padding: 6px 8px;
width: fit-content; width: fit-content;
${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall` @media (max-width: ${({ theme }) => `${theme.breakpoint.sm}px`}) {
flex: 1 1 auto; flex: 1 1 auto;
width: 100%; width: 50%;
`}; }
` `
const MainContentWrapper = styled.main` const MainContentWrapper = styled.main`
...@@ -180,12 +172,12 @@ function WrongNetworkCard() { ...@@ -180,12 +172,12 @@ function WrongNetworkCard() {
<MainContentWrapper> <MainContentWrapper>
<ErrorContainer> <ErrorContainer>
<ThemedText.DeprecatedBody color={theme.textTertiary} textAlign="center"> <ThemedText.BodyPrimary color={theme.textTertiary} textAlign="center">
<NetworkIcon strokeWidth={1.2} /> <NetworkIcon strokeWidth={1.2} />
<div data-testid="pools-unsupported-err"> <div data-testid="pools-unsupported-err">
<Trans>Your connected network is unsupported.</Trans> <Trans>Your connected network is unsupported.</Trans>
</div> </div>
</ThemedText.DeprecatedBody> </ThemedText.BodyPrimary>
</ErrorContainer> </ErrorContainer>
</MainContentWrapper> </MainContentWrapper>
</AutoColumn> </AutoColumn>
...@@ -301,12 +293,12 @@ export default function Pool() { ...@@ -301,12 +293,12 @@ export default function Pool() {
/> />
) : ( ) : (
<ErrorContainer> <ErrorContainer>
<ThemedText.DeprecatedBody color={theme.textTertiary} textAlign="center"> <ThemedText.BodyPrimary color={theme.textTertiary} textAlign="center">
<InboxIcon strokeWidth={1} style={{ marginTop: '2em' }} /> <InboxIcon strokeWidth={1} style={{ marginTop: '2em' }} />
<div> <div>
<Trans>Your active V3 liquidity positions will appear here.</Trans> <Trans>Your active V3 liquidity positions will appear here.</Trans>
</div> </div>
</ThemedText.DeprecatedBody> </ThemedText.BodyPrimary>
{!showConnectAWallet && closedPositions.length > 0 && ( {!showConnectAWallet && closedPositions.length > 0 && (
<ButtonText <ButtonText
style={{ marginTop: '.5rem' }} style={{ marginTop: '.5rem' }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment