Commit f7354c98 authored by Jack Short's avatar Jack Short Committed by GitHub

refactor: removes BodyWrapper padding (#4375)

* fix: removing bodywrapper padding for phase1

* reverting to previous version and adjusting padding across pages appropriately

* adjusting padding on add liquidity page

* prettier changes

* missed semicolon
parent 1636786a
...@@ -36,6 +36,7 @@ export const ScrollablePage = styled.div` ...@@ -36,6 +36,7 @@ export const ScrollablePage = styled.div`
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.mediaWidth.upToMedium`
max-width: 480px; max-width: 480px;
margin: 0 auto; margin: 0 auto;
padding: 0px 8px;
`}; `};
` `
......
...@@ -55,11 +55,11 @@ const BodyWrapper = styled.div<{ navBarFlag: NavBarVariant }>` ...@@ -55,11 +55,11 @@ const BodyWrapper = styled.div<{ navBarFlag: NavBarVariant }>`
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
padding: ${({ navBarFlag }) => (navBarFlag === NavBarVariant.Enabled ? `72px 16px 0px 16px` : `120px 16px 0px 16px`)}; padding: ${({ navBarFlag }) => (navBarFlag === NavBarVariant.Enabled ? `72px 0px 0px 0px` : `120px 0px 0px 0px`)};
align-items: center; align-items: center;
flex: 1; flex: 1;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.mediaWidth.upToSmall`
padding: 52px 8px 16px 8px; padding: 52px 0px 16px 0px;
`}; `};
` `
......
...@@ -33,6 +33,12 @@ import { ProposalAction, ProposalActionSelector, ProposalActionSelectorModal } f ...@@ -33,6 +33,12 @@ import { ProposalAction, ProposalActionSelector, ProposalActionSelectorModal } f
import { ProposalEditor } from './ProposalEditor' import { ProposalEditor } from './ProposalEditor'
import { ProposalSubmissionModal } from './ProposalSubmissionModal' import { ProposalSubmissionModal } from './ProposalSubmissionModal'
const PageWrapper = styled(AutoColumn)`
${({ theme }) => theme.mediaWidth.upToMedium`
padding: 0px 8px;
`};
`
const CreateProposalButton = ({ const CreateProposalButton = ({
proposalThreshold, proposalThreshold,
hasActiveOrPendingProposal, hasActiveOrPendingProposal,
...@@ -228,65 +234,67 @@ ${bodyValue} ...@@ -228,65 +234,67 @@ ${bodyValue}
return ( return (
<Trace page={PageName.VOTE_PAGE} shouldLogImpression> <Trace page={PageName.VOTE_PAGE} shouldLogImpression>
<AppBody {...{ maxWidth: '800px' }}> <PageWrapper>
<CreateProposalTabs /> <AppBody {...{ maxWidth: '800px' }}>
<CreateProposalWrapper> <CreateProposalTabs />
<BlueCard> <CreateProposalWrapper>
<AutoColumn gap="10px"> <BlueCard>
<ThemedText.DeprecatedLink fontWeight={400} color={'deprecated_primaryText1'}> <AutoColumn gap="10px">
<Trans> <ThemedText.DeprecatedLink fontWeight={400} color={'deprecated_primaryText1'}>
<strong>Tip:</strong> Select an action and describe your proposal for the community. The proposal <Trans>
cannot be modified after submission, so please verify all information before submitting. The voting <strong>Tip:</strong> Select an action and describe your proposal for the community. The proposal
period will begin immediately and last for 7 days. To propose a custom action,{' '} cannot be modified after submission, so please verify all information before submitting. The voting
<ExternalLink href="https://docs.uniswap.org/protocol/reference/Governance/governance-reference#propose"> period will begin immediately and last for 7 days. To propose a custom action,{' '}
read the docs <ExternalLink href="https://docs.uniswap.org/protocol/reference/Governance/governance-reference#propose">
</ExternalLink> read the docs
. </ExternalLink>
</Trans> .
</ThemedText.DeprecatedLink> </Trans>
</AutoColumn> </ThemedText.DeprecatedLink>
</BlueCard> </AutoColumn>
</BlueCard>
<ProposalActionSelector onClick={handleActionSelectorClick} proposalAction={proposalAction} />
<ProposalActionDetail <ProposalActionSelector onClick={handleActionSelectorClick} proposalAction={proposalAction} />
proposalAction={proposalAction} <ProposalActionDetail
currency={currencyValue} proposalAction={proposalAction}
amount={amountValue} currency={currencyValue}
toAddress={toAddressValue} amount={amountValue}
onCurrencySelect={handleCurrencySelect} toAddress={toAddressValue}
onAmountInput={handleAmountInput} onCurrencySelect={handleCurrencySelect}
onToAddressInput={handleToAddressInput} onAmountInput={handleAmountInput}
/> onToAddressInput={handleToAddressInput}
<ProposalEditor />
title={titleValue} <ProposalEditor
body={bodyValue} title={titleValue}
onTitleInput={handleTitleInput} body={bodyValue}
onBodyInput={handleBodyInput} onTitleInput={handleTitleInput}
/> onBodyInput={handleBodyInput}
<CreateProposalButton />
proposalThreshold={proposalThreshold} <CreateProposalButton
hasActiveOrPendingProposal={ proposalThreshold={proposalThreshold}
latestProposalData?.status === ProposalState.ACTIVE || hasActiveOrPendingProposal={
latestProposalData?.status === ProposalState.PENDING latestProposalData?.status === ProposalState.ACTIVE ||
} latestProposalData?.status === ProposalState.PENDING
hasEnoughVote={hasEnoughVote} }
isFormInvalid={isFormInvalid} hasEnoughVote={hasEnoughVote}
handleCreateProposal={handleCreateProposal} isFormInvalid={isFormInvalid}
handleCreateProposal={handleCreateProposal}
/>
{!hasEnoughVote ? (
<AutonomousProposalCTA>
Don’t have 2.5M votes? Anyone can create an autonomous proposal using{' '}
<ExternalLink href="https://fish.vote">fish.vote</ExternalLink>
</AutonomousProposalCTA>
) : null}
</CreateProposalWrapper>
<ProposalActionSelectorModal
isOpen={modalOpen}
onDismiss={handleDismissActionSelector}
onProposalActionSelect={(proposalAction: ProposalAction) => handleActionChange(proposalAction)}
/> />
{!hasEnoughVote ? ( <ProposalSubmissionModal isOpen={attempting} hash={hash} onDismiss={handleDismissSubmissionModal} />
<AutonomousProposalCTA> </AppBody>
Don’t have 2.5M votes? Anyone can create an autonomous proposal using{' '} </PageWrapper>
<ExternalLink href="https://fish.vote">fish.vote</ExternalLink>
</AutonomousProposalCTA>
) : null}
</CreateProposalWrapper>
<ProposalActionSelectorModal
isOpen={modalOpen}
onDismiss={handleDismissActionSelector}
onProposalActionSelect={(proposalAction: ProposalAction) => handleActionChange(proposalAction)}
/>
<ProposalSubmissionModal isOpen={attempting} hash={hash} onDismiss={handleDismissSubmissionModal} />
</AppBody>
</Trace> </Trace>
) )
} }
...@@ -31,6 +31,9 @@ import { currencyId } from '../../utils/currencyId' ...@@ -31,6 +31,9 @@ import { currencyId } from '../../utils/currencyId'
const PageWrapper = styled(AutoColumn)` const PageWrapper = styled(AutoColumn)`
max-width: 640px; max-width: 640px;
width: 100%; width: 100%;
${({ theme }) => theme.mediaWidth.upToSmall`
padding: 0px 8px;
`};
` `
const PositionInfo = styled(AutoColumn)<{ dim: any }>` const PositionInfo = styled(AutoColumn)<{ dim: any }>`
......
...@@ -17,6 +17,9 @@ import { Countdown } from './Countdown' ...@@ -17,6 +17,9 @@ import { Countdown } from './Countdown'
const PageWrapper = styled(AutoColumn)` const PageWrapper = styled(AutoColumn)`
max-width: 640px; max-width: 640px;
width: 100%; width: 100%;
${({ theme }) => theme.mediaWidth.upToSmall`
padding: 0px 8px;
`};
` `
const TopSection = styled(AutoColumn)` const TopSection = styled(AutoColumn)`
......
...@@ -30,6 +30,7 @@ const PageWrapper = styled(AutoColumn)` ...@@ -30,6 +30,7 @@ const PageWrapper = styled(AutoColumn)`
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.mediaWidth.upToMedium`
max-width: 800px; max-width: 800px;
padding: 0px 8px;
`}; `};
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.mediaWidth.upToSmall`
......
...@@ -29,6 +29,10 @@ import { ExternalLink, HideSmall, ThemedText } from '../../theme' ...@@ -29,6 +29,10 @@ import { ExternalLink, HideSmall, ThemedText } from '../../theme'
const PageWrapper = styled(AutoColumn)` const PageWrapper = styled(AutoColumn)`
max-width: 640px; max-width: 640px;
width: 100%; width: 100%;
${({ theme }) => theme.mediaWidth.upToSmall`
padding: 0px 8px;
`};
` `
const VoteCard = styled(DataCard)` const VoteCard = styled(DataCard)`
......
...@@ -32,7 +32,11 @@ import { ZERO_ADDRESS } from '../../constants/misc' ...@@ -32,7 +32,11 @@ import { ZERO_ADDRESS } from '../../constants/misc'
import { UNI } from '../../constants/tokens' import { UNI } from '../../constants/tokens'
import { ProposalStatus } from './styled' import { ProposalStatus } from './styled'
const PageWrapper = styled(AutoColumn)`` const PageWrapper = styled(AutoColumn)`
${({ theme }) => theme.mediaWidth.upToSmall`
padding: 0px 8px;
`};
`
const TopSection = styled(AutoColumn)` const TopSection = styled(AutoColumn)`
max-width: 640px; max-width: 640px;
......
...@@ -57,6 +57,9 @@ import { ProposalStatus } from './styled' ...@@ -57,6 +57,9 @@ import { ProposalStatus } from './styled'
const PageWrapper = styled(AutoColumn)` const PageWrapper = styled(AutoColumn)`
width: 100%; width: 100%;
${({ theme }) => theme.mediaWidth.upToSmall`
padding: 0px 8px;
`};
` `
const ProposalInfo = styled(AutoColumn)` const ProposalInfo = styled(AutoColumn)`
......
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