Commit e8880be1 authored by Mike Grabowski's avatar Mike Grabowski Committed by GitHub

feat: better error page (#5536)

* initial commit

* wrap up styling

* feat: add eventId

* chore: finialise design

* chore: simplify css

* feat: use grids from theme and font family
parent 0e9b0540
import styled from 'styled-components/macro' import styled, { DefaultTheme } from 'styled-components/macro'
const Column = styled.div` type Gap = keyof DefaultTheme['grids']
export const Column = styled.div<{
gap?: Gap
}>`
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-start; justify-content: flex-start;
gap: ${({ gap, theme }) => gap && theme.grids[gap]};
` `
export const ColumnCenter = styled(Column)` export const ColumnCenter = styled(Column)`
width: 100%; width: 100%;
...@@ -11,12 +16,12 @@ export const ColumnCenter = styled(Column)` ...@@ -11,12 +16,12 @@ export const ColumnCenter = styled(Column)`
` `
export const AutoColumn = styled.div<{ export const AutoColumn = styled.div<{
gap?: 'sm' | 'md' | 'lg' | string gap?: Gap | string
justify?: 'stretch' | 'center' | 'start' | 'end' | 'flex-start' | 'flex-end' | 'space-between' justify?: 'stretch' | 'center' | 'start' | 'end' | 'flex-start' | 'flex-end' | 'space-between'
}>` }>`
display: grid; display: grid;
grid-auto-rows: auto; grid-auto-rows: auto;
grid-row-gap: ${({ gap }) => (gap === 'sm' && '8px') || (gap === 'md' && '12px') || (gap === 'lg' && '24px') || gap}; grid-row-gap: ${({ gap, theme }) => (gap && theme.grids[gap as Gap]) || gap};
justify-items: ${({ justify }) => justify && justify}; justify-items: ${({ justify }) => justify && justify};
` `
......
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import * as Sentry from '@sentry/react' import * as Sentry from '@sentry/react'
import React, { PropsWithChildren } from 'react' import { ButtonLight, ButtonPrimary } from 'components/Button'
import { ChevronUpIcon } from 'nft/components/icons'
import { useIsMobile } from 'nft/hooks'
import React, { PropsWithChildren, useState } from 'react'
import { Copy } from 'react-feather'
import styled from 'styled-components/macro' import styled from 'styled-components/macro'
import { ExternalLink, ThemedText } from '../../theme' import { CopyToClipboard, ExternalLink, ThemedText } from '../../theme'
import { AutoColumn } from '../Column' import { Column } from '../Column'
import { AutoRow } from '../Row'
const FallbackWrapper = styled.div` const FallbackWrapper = styled.div`
display: flex; display: flex;
flex-direction: column; width: 100vw;
width: 100%; height: 100vh;
align-items: center;
z-index: 1;
` `
const BodyWrapper = styled.div<{ margin?: string }>` const BodyWrapper = styled.div<{ margin?: string }>`
width: 100%;
max-width: 500px;
margin: auto;
padding: 1rem; padding: 1rem;
`
const SmallButtonPrimary = styled(ButtonPrimary)`
width: auto;
font-size: 16px;
padding: 10px 16px;
border-radius: 12px;
`
const SmallButtonLight = styled(ButtonLight)`
font-size: 16px;
padding: 10px 16px;
border-radius: 12px;
`
const StretchedRow = styled.div`
display: flex;
gap: 24px;
> * {
display: flex;
flex: 1;
}
`
const Code = styled.code`
font-weight: 300;
font-size: 12px;
line-height: 16px;
word-wrap: break-word;
width: 100%; width: 100%;
color: ${({ theme }) => theme.textPrimary};
font-family: ${({ theme }) => theme.fonts.code};
overflow: scroll;
max-height: calc(100vh - 450px);
`
const Separator = styled.div`
border-bottom: 1px solid ${({ theme }) => theme.backgroundOutline};
` `
const CodeBlockWrapper = styled.div` const CodeBlockWrapper = styled.div`
background: ${({ theme }) => theme.deprecated_bg0}; display: flex;
overflow: auto; flex-direction: column;
white-space: pre; background: ${({ theme }) => theme.backgroundModule};
box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.01), 0px 4px 8px rgba(0, 0, 0, 0.04), 0px 16px 24px rgba(0, 0, 0, 0.04), box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.01), 0px 4px 8px rgba(0, 0, 0, 0.04), 0px 16px 24px rgba(0, 0, 0, 0.04),
0px 24px 32px rgba(0, 0, 0, 0.01); 0px 24px 32px rgba(0, 0, 0, 0.01);
border-radius: 24px; border-radius: 24px;
padding: 18px 24px; padding: 24px;
color: ${({ theme }) => theme.deprecated_text1}; gap: 10px;
color: ${({ theme }) => theme.textPrimary};
`
const ShowMoreButton = styled.div`
display: flex;
cursor: pointer;
justify-content: space-between;
`
const CopyIcon = styled(Copy)`
stroke: ${({ theme }) => theme.textSecondary};
` `
const Padding = styled.div` const ShowMoreIcon = styled(ChevronUpIcon)<{ $isExpanded?: boolean }>`
padding: 6px 24px; transform: ${({ $isExpanded }) => ($isExpanded ? 'none' : 'rotate(180deg)')};
` `
const Fallback = ({ error }: { error: Error }) => { const CodeTitle = styled.div`
display: flex;
gap: 14px;
align-items: center;
word-break: break-word;
`
const Fallback = ({ error, eventId }: { error: Error; eventId: string | null }) => {
const [isExpanded, setExpanded] = useState(false)
const isMobile = useIsMobile()
const errorId = eventId || 'unknown-error'
// @todo: ThemedText components should be responsive by default
const [Title, Description] = isMobile
? [ThemedText.HeadlineSmall, ThemedText.BodySmall]
: [ThemedText.HeadlineLarge, ThemedText.BodySecondary]
return ( return (
<FallbackWrapper> <FallbackWrapper>
<BodyWrapper> <BodyWrapper>
<AutoColumn gap="md"> <Column gap="xl">
<Padding> <Column gap="sm">
<ThemedText.DeprecatedLabel fontSize={24} fontWeight={600}> <Title textAlign="center">
<Trans>Something went wrong</Trans> <Trans>Something went wrong</Trans>
</ThemedText.DeprecatedLabel> </Title>
</Padding> <Description textAlign="center" color="textSecondary">
<Trans>
Sorry, an error occured while processing your request. If you request support, be sure to provide your
error ID.
</Trans>
</Description>
</Column>
<CodeBlockWrapper> <CodeBlockWrapper>
<code> <CodeTitle>
<ThemedText.DeprecatedMain fontSize={10}>{error.stack}</ThemedText.DeprecatedMain> <ThemedText.SubHeader fontWeight={500}>Error ID: {errorId}</ThemedText.SubHeader>
</code> <CopyToClipboard toCopy={errorId}>
<CopyIcon />
</CopyToClipboard>
</CodeTitle>
<Separator />
{isExpanded && (
<>
<Code>{error.stack}</Code>
<Separator />
</>
)}
<ShowMoreButton onClick={() => setExpanded((s) => !s)}>
<ThemedText.Link color="textSecondary">
<Trans>{isExpanded ? 'Show less' : 'Show more'}</Trans>
</ThemedText.Link>
<ShowMoreIcon $isExpanded={isExpanded} secondaryWidth="20" secondaryHeight="20" />
</ShowMoreButton>
</CodeBlockWrapper> </CodeBlockWrapper>
<AutoRow> <StretchedRow>
<Padding> <SmallButtonPrimary onClick={() => window.location.reload()}>
<ExternalLink id="get-support-on-discord" href="https://discord.gg/FCfyBSbCU5" target="_blank"> <Trans>Reload the app</Trans>
<ThemedText.DeprecatedLink fontSize={16} color="deprecated_blue1"> </SmallButtonPrimary>
<Trans>Get support on Discord</Trans> <ExternalLink id="get-support-on-discord" href="https://discord.gg/FCfyBSbCU5" target="_blank">
<span></span> <SmallButtonLight>
</ThemedText.DeprecatedLink> <Trans>Get support</Trans>
</ExternalLink> </SmallButtonLight>
</Padding> </ExternalLink>
</AutoRow> </StretchedRow>
</AutoColumn> </Column>
</BodyWrapper> </BodyWrapper>
</FallbackWrapper> </FallbackWrapper>
) )
...@@ -73,7 +165,7 @@ async function updateServiceWorker(): Promise<ServiceWorkerRegistration> { ...@@ -73,7 +165,7 @@ async function updateServiceWorker(): Promise<ServiceWorkerRegistration> {
return ready.update() as unknown as Promise<ServiceWorkerRegistration> return ready.update() as unknown as Promise<ServiceWorkerRegistration>
} }
const reloadIfUpdateAvailable = async () => { const updateServiceWorkerInBackground = async () => {
try { try {
const registration = await updateServiceWorker() const registration = await updateServiceWorker()
...@@ -85,8 +177,6 @@ const reloadIfUpdateAvailable = async () => { ...@@ -85,8 +177,6 @@ const reloadIfUpdateAvailable = async () => {
// Makes Workbox call skipWaiting(). // Makes Workbox call skipWaiting().
// For more info on skipWaiting see: https://web.dev/service-worker-lifecycle/#skip-the-waiting-phase // For more info on skipWaiting see: https://web.dev/service-worker-lifecycle/#skip-the-waiting-phase
registration.waiting.postMessage({ type: 'SKIP_WAITING' }) registration.waiting.postMessage({ type: 'SKIP_WAITING' })
window.location.reload()
} }
} catch (error) { } catch (error) {
console.error('Failed to update service worker', error) console.error('Failed to update service worker', error)
...@@ -96,11 +186,11 @@ const reloadIfUpdateAvailable = async () => { ...@@ -96,11 +186,11 @@ const reloadIfUpdateAvailable = async () => {
export default function ErrorBoundary({ children }: PropsWithChildren): JSX.Element { export default function ErrorBoundary({ children }: PropsWithChildren): JSX.Element {
return ( return (
<Sentry.ErrorBoundary <Sentry.ErrorBoundary
fallback={Fallback} fallback={({ error, eventId }) => <Fallback error={error} eventId={eventId} />}
beforeCapture={(scope) => { beforeCapture={(scope) => {
scope.setLevel('fatal') scope.setLevel('fatal')
}} }}
onError={reloadIfUpdateAvailable} onError={updateServiceWorkerInBackground}
> >
{children} {children}
</Sentry.ErrorBoundary> </Sentry.ErrorBoundary>
......
...@@ -21,7 +21,7 @@ export default function FailedNetworkSwitchPopup({ chainId }: { chainId: Support ...@@ -21,7 +21,7 @@ export default function FailedNetworkSwitchPopup({ chainId }: { chainId: Support
<div style={{ paddingRight: 16 }}> <div style={{ paddingRight: 16 }}>
<AlertCircle color={theme.deprecated_red1} size={24} /> <AlertCircle color={theme.deprecated_red1} size={24} />
</div> </div>
<AutoColumn gap="8px"> <AutoColumn gap="sm">
<ThemedText.DeprecatedBody fontWeight={500}> <ThemedText.DeprecatedBody fontWeight={500}>
<Trans> <Trans>
Failed to switch networks from the Uniswap Interface. In order to use Uniswap on {chainInfo.label}, you must Failed to switch networks from the Uniswap Interface. In order to use Uniswap on {chainInfo.label}, you must
......
...@@ -41,7 +41,7 @@ export default function SushiPositionCard({ tokenA, tokenB, liquidityToken, bord ...@@ -41,7 +41,7 @@ export default function SushiPositionCard({ tokenA, tokenB, liquidityToken, bord
return ( return (
<StyledPositionCard border={border} bgColor={backgroundColor}> <StyledPositionCard border={border} bgColor={backgroundColor}>
<CardNoise /> <CardNoise />
<AutoColumn gap="12px"> <AutoColumn gap="md">
<FixedHeightRow> <FixedHeightRow>
<AutoRow gap="8px"> <AutoRow gap="8px">
<DoubleCurrencyLogo currency0={currency0} currency1={currency1} size={20} /> <DoubleCurrencyLogo currency0={currency0} currency1={currency1} size={20} />
......
...@@ -79,7 +79,7 @@ export default function V2PositionCard({ pair, border, stakedBalance }: Position ...@@ -79,7 +79,7 @@ export default function V2PositionCard({ pair, border, stakedBalance }: Position
return ( return (
<StyledPositionCard border={border} bgColor={backgroundColor}> <StyledPositionCard border={border} bgColor={backgroundColor}>
<CardNoise /> <CardNoise />
<AutoColumn gap="12px"> <AutoColumn gap="md">
<FixedHeightRow> <FixedHeightRow>
<AutoRow gap="8px"> <AutoRow gap="8px">
<DoubleCurrencyLogo currency0={currency0} currency1={currency1} size={20} /> <DoubleCurrencyLogo currency0={currency0} currency1={currency1} size={20} />
...@@ -116,7 +116,7 @@ export default function V2PositionCard({ pair, border, stakedBalance }: Position ...@@ -116,7 +116,7 @@ export default function V2PositionCard({ pair, border, stakedBalance }: Position
</FixedHeightRow> </FixedHeightRow>
{showMore && ( {showMore && (
<AutoColumn gap="8px"> <AutoColumn gap="sm">
<FixedHeightRow> <FixedHeightRow>
<Text fontSize={16} fontWeight={500}> <Text fontSize={16} fontWeight={500}>
<Trans>Your total pool tokens:</Trans> <Trans>Your total pool tokens:</Trans>
......
...@@ -79,7 +79,7 @@ export function MinimalPositionCard({ pair, showUnwrapped = false, border }: Pos ...@@ -79,7 +79,7 @@ export function MinimalPositionCard({ pair, showUnwrapped = false, border }: Pos
<> <>
{userPoolBalance && JSBI.greaterThan(userPoolBalance.quotient, JSBI.BigInt(0)) ? ( {userPoolBalance && JSBI.greaterThan(userPoolBalance.quotient, JSBI.BigInt(0)) ? (
<GrayCard border={border}> <GrayCard border={border}>
<AutoColumn gap="12px"> <AutoColumn gap="md">
<FixedHeightRow> <FixedHeightRow>
<RowFixed> <RowFixed>
<Text fontWeight={500} fontSize={16}> <Text fontWeight={500} fontSize={16}>
...@@ -195,7 +195,7 @@ export default function FullPositionCard({ pair, border, stakedBalance }: Positi ...@@ -195,7 +195,7 @@ export default function FullPositionCard({ pair, border, stakedBalance }: Positi
return ( return (
<StyledPositionCard border={border} bgColor={backgroundColor}> <StyledPositionCard border={border} bgColor={backgroundColor}>
<CardNoise /> <CardNoise />
<AutoColumn gap="12px"> <AutoColumn gap="md">
<FixedHeightRow> <FixedHeightRow>
<AutoRow gap="8px" style={{ marginLeft: '8px' }}> <AutoRow gap="8px" style={{ marginLeft: '8px' }}>
<DoubleCurrencyLogo currency0={currency0} currency1={currency1} size={20} /> <DoubleCurrencyLogo currency0={currency0} currency1={currency1} size={20} />
...@@ -227,7 +227,7 @@ export default function FullPositionCard({ pair, border, stakedBalance }: Positi ...@@ -227,7 +227,7 @@ export default function FullPositionCard({ pair, border, stakedBalance }: Positi
</FixedHeightRow> </FixedHeightRow>
{showMore && ( {showMore && (
<AutoColumn gap="8px"> <AutoColumn gap="sm">
<FixedHeightRow> <FixedHeightRow>
<Text fontSize={16} fontWeight={500}> <Text fontSize={16} fontWeight={500}>
<Trans>Your total pool tokens:</Trans> <Trans>Your total pool tokens:</Trans>
......
...@@ -95,7 +95,7 @@ export function PrivacyPolicyModal() { ...@@ -95,7 +95,7 @@ export function PrivacyPolicyModal() {
return ( return (
<Modal isOpen={open} onDismiss={() => toggle()}> <Modal isOpen={open} onDismiss={() => toggle()}>
<AutoColumn gap="12px" ref={node as any}> <AutoColumn gap="md" ref={node as any}>
<RowBetween padding="1rem 1rem 0.5rem 1rem"> <RowBetween padding="1rem 1rem 0.5rem 1rem">
<ThemedText.DeprecatedMediumHeader> <ThemedText.DeprecatedMediumHeader>
<Trans>Legal & Privacy</Trans> <Trans>Legal & Privacy</Trans>
...@@ -122,7 +122,7 @@ function PrivacyPolicy() { ...@@ -122,7 +122,7 @@ function PrivacyPolicy() {
}} }}
> >
<AutoColumn gap="16px"> <AutoColumn gap="16px">
<AutoColumn gap="8px" style={{ width: '100%' }}> <AutoColumn gap="sm" style={{ width: '100%' }}>
<StyledExternalCard> <StyledExternalCard>
<ExternalLink href="https://uniswap.org/terms-of-service"> <ExternalLink href="https://uniswap.org/terms-of-service">
<RowBetween> <RowBetween>
...@@ -153,10 +153,10 @@ function PrivacyPolicy() { ...@@ -153,10 +153,10 @@ function PrivacyPolicy() {
<ThemedText.DeprecatedMain fontSize={14}> <ThemedText.DeprecatedMain fontSize={14}>
<Trans>This app uses the following third-party APIs:</Trans> <Trans>This app uses the following third-party APIs:</Trans>
</ThemedText.DeprecatedMain> </ThemedText.DeprecatedMain>
<AutoColumn gap="12px"> <AutoColumn gap="md">
{EXTERNAL_APIS.map(({ name, description }, i) => ( {EXTERNAL_APIS.map(({ name, description }, i) => (
<DarkGrayCard key={i}> <DarkGrayCard key={i}>
<AutoColumn gap="8px"> <AutoColumn gap="sm">
<AutoRow gap="4px"> <AutoRow gap="4px">
<Info size={18} /> <Info size={18} />
<ThemedText.DeprecatedMain fontSize={14} color="deprecated_text1"> <ThemedText.DeprecatedMain fontSize={14} color="deprecated_text1">
......
...@@ -73,7 +73,7 @@ function ConfirmationPendingContent({ ...@@ -73,7 +73,7 @@ function ConfirmationPendingContent({
<ConfirmedIcon inline={inline}> <ConfirmedIcon inline={inline}>
<CustomLightSpinner src={Circle} alt="loader" size={inline ? '40px' : '90px'} /> <CustomLightSpinner src={Circle} alt="loader" size={inline ? '40px' : '90px'} />
</ConfirmedIcon> </ConfirmedIcon>
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<Text fontWeight={500} fontSize={20} color={theme.textPrimary} textAlign="center"> <Text fontWeight={500} fontSize={20} color={theme.textPrimary} textAlign="center">
<Trans>Waiting for confirmation</Trans> <Trans>Waiting for confirmation</Trans>
</Text> </Text>
...@@ -135,7 +135,7 @@ function TransactionSubmittedContent({ ...@@ -135,7 +135,7 @@ function TransactionSubmittedContent({
<ConfirmedIcon inline={inline}> <ConfirmedIcon inline={inline}>
<ArrowUpCircle strokeWidth={1} size={inline ? '40px' : '75px'} color={theme.accentActive} /> <ArrowUpCircle strokeWidth={1} size={inline ? '40px' : '75px'} color={theme.accentActive} />
</ConfirmedIcon> </ConfirmedIcon>
<AutoColumn gap="12px" justify="center" style={{ paddingBottom: '12px' }}> <AutoColumn gap="md" justify="center" style={{ paddingBottom: '12px' }}>
<ThemedText.MediumHeader textAlign="center"> <ThemedText.MediumHeader textAlign="center">
<Trans>Transaction submitted</Trans> <Trans>Transaction submitted</Trans>
</ThemedText.MediumHeader> </ThemedText.MediumHeader>
...@@ -276,7 +276,7 @@ function L2Content({ ...@@ -276,7 +276,7 @@ function L2Content({
<CustomLightSpinner src={Circle} alt="loader" size={inline ? '40px' : '90px'} /> <CustomLightSpinner src={Circle} alt="loader" size={inline ? '40px' : '90px'} />
)} )}
</ConfirmedIcon> </ConfirmedIcon>
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<Text fontWeight={500} fontSize={20} textAlign="center"> <Text fontWeight={500} fontSize={20} textAlign="center">
{!hash ? ( {!hash ? (
<Trans>Confirm transaction in wallet</Trans> <Trans>Confirm transaction in wallet</Trans>
......
...@@ -156,7 +156,7 @@ export default function AddressClaimModal({ isOpen, onDismiss }: { isOpen: boole ...@@ -156,7 +156,7 @@ export default function AddressClaimModal({ isOpen, onDismiss }: { isOpen: boole
)} )}
</ConfirmedIcon> </ConfirmedIcon>
<AutoColumn gap="100px" justify="center"> <AutoColumn gap="100px" justify="center">
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<ThemedText.DeprecatedLargeHeader fontWeight={600} color="black"> <ThemedText.DeprecatedLargeHeader fontWeight={600} color="black">
{claimConfirmed ? <Trans>Claimed</Trans> : <Trans>Claiming</Trans>} {claimConfirmed ? <Trans>Claimed</Trans> : <Trans>Claiming</Trans>}
</ThemedText.DeprecatedLargeHeader> </ThemedText.DeprecatedLargeHeader>
......
...@@ -184,7 +184,7 @@ export default function ClaimModal() { ...@@ -184,7 +184,7 @@ export default function ClaimModal() {
)} )}
</ConfirmedIcon> </ConfirmedIcon>
<AutoColumn gap="100px" justify="center"> <AutoColumn gap="100px" justify="center">
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<ThemedText.DeprecatedLargeHeader fontWeight={600} color="black"> <ThemedText.DeprecatedLargeHeader fontWeight={600} color="black">
{claimConfirmed ? <Trans>Claimed!</Trans> : <Trans>Claiming</Trans>} {claimConfirmed ? <Trans>Claimed!</Trans> : <Trans>Claiming</Trans>}
</ThemedText.DeprecatedLargeHeader> </ThemedText.DeprecatedLargeHeader>
......
...@@ -88,9 +88,7 @@ export default function ClaimRewardModal({ isOpen, onDismiss, stakingInfo }: Sta ...@@ -88,9 +88,7 @@ export default function ClaimRewardModal({ isOpen, onDismiss, stakingInfo }: Sta
</RowBetween> </RowBetween>
{stakingInfo?.earnedAmount && ( {stakingInfo?.earnedAmount && (
<AutoColumn justify="center" gap="md"> <AutoColumn justify="center" gap="md">
<ThemedText.DeprecatedBody fontWeight={600} fontSize={36}> <ThemedText.HeadlineLarge>{stakingInfo?.earnedAmount?.toSignificant(6)}</ThemedText.HeadlineLarge>
{stakingInfo?.earnedAmount?.toSignificant(6)}
</ThemedText.DeprecatedBody>
<ThemedText.DeprecatedBody> <ThemedText.DeprecatedBody>
<Trans>Unclaimed UNI</Trans> <Trans>Unclaimed UNI</Trans>
</ThemedText.DeprecatedBody> </ThemedText.DeprecatedBody>
...@@ -106,7 +104,7 @@ export default function ClaimRewardModal({ isOpen, onDismiss, stakingInfo }: Sta ...@@ -106,7 +104,7 @@ export default function ClaimRewardModal({ isOpen, onDismiss, stakingInfo }: Sta
)} )}
{attempting && !hash && ( {attempting && !hash && (
<LoadingView onDismiss={wrappedOnDismiss}> <LoadingView onDismiss={wrappedOnDismiss}>
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<ThemedText.DeprecatedBody fontSize={20}> <ThemedText.DeprecatedBody fontSize={20}>
<Trans>Claiming {stakingInfo?.earnedAmount?.toSignificant(6)} UNI</Trans> <Trans>Claiming {stakingInfo?.earnedAmount?.toSignificant(6)} UNI</Trans>
</ThemedText.DeprecatedBody> </ThemedText.DeprecatedBody>
...@@ -115,7 +113,7 @@ export default function ClaimRewardModal({ isOpen, onDismiss, stakingInfo }: Sta ...@@ -115,7 +113,7 @@ export default function ClaimRewardModal({ isOpen, onDismiss, stakingInfo }: Sta
)} )}
{hash && ( {hash && (
<SubmittedView onDismiss={wrappedOnDismiss} hash={hash}> <SubmittedView onDismiss={wrappedOnDismiss} hash={hash}>
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<ThemedText.DeprecatedLargeHeader> <ThemedText.DeprecatedLargeHeader>
<Trans>Transaction Submitted</Trans> <Trans>Transaction Submitted</Trans>
</ThemedText.DeprecatedLargeHeader> </ThemedText.DeprecatedLargeHeader>
......
...@@ -222,7 +222,7 @@ export default function StakingModal({ isOpen, onDismiss, stakingInfo, userLiqui ...@@ -222,7 +222,7 @@ export default function StakingModal({ isOpen, onDismiss, stakingInfo, userLiqui
)} )}
{attempting && !hash && ( {attempting && !hash && (
<LoadingView onDismiss={wrappedOnDismiss}> <LoadingView onDismiss={wrappedOnDismiss}>
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<ThemedText.DeprecatedLargeHeader> <ThemedText.DeprecatedLargeHeader>
<Trans>Depositing Liquidity</Trans> <Trans>Depositing Liquidity</Trans>
</ThemedText.DeprecatedLargeHeader> </ThemedText.DeprecatedLargeHeader>
...@@ -234,7 +234,7 @@ export default function StakingModal({ isOpen, onDismiss, stakingInfo, userLiqui ...@@ -234,7 +234,7 @@ export default function StakingModal({ isOpen, onDismiss, stakingInfo, userLiqui
)} )}
{attempting && hash && ( {attempting && hash && (
<SubmittedView onDismiss={wrappedOnDismiss} hash={hash}> <SubmittedView onDismiss={wrappedOnDismiss} hash={hash}>
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<ThemedText.DeprecatedLargeHeader> <ThemedText.DeprecatedLargeHeader>
<Trans>Transaction Submitted</Trans> <Trans>Transaction Submitted</Trans>
</ThemedText.DeprecatedLargeHeader> </ThemedText.DeprecatedLargeHeader>
......
...@@ -90,9 +90,9 @@ export default function UnstakingModal({ isOpen, onDismiss, stakingInfo }: Staki ...@@ -90,9 +90,9 @@ export default function UnstakingModal({ isOpen, onDismiss, stakingInfo }: Staki
</RowBetween> </RowBetween>
{stakingInfo?.stakedAmount && ( {stakingInfo?.stakedAmount && (
<AutoColumn justify="center" gap="md"> <AutoColumn justify="center" gap="md">
<ThemedText.DeprecatedBody fontWeight={600} fontSize={36}> <ThemedText.HeadlineLarge>
<FormattedCurrencyAmount currencyAmount={stakingInfo.stakedAmount} /> <FormattedCurrencyAmount currencyAmount={stakingInfo.stakedAmount} />
</ThemedText.DeprecatedBody> </ThemedText.HeadlineLarge>
<ThemedText.DeprecatedBody> <ThemedText.DeprecatedBody>
<Trans>Deposited liquidity:</Trans> <Trans>Deposited liquidity:</Trans>
</ThemedText.DeprecatedBody> </ThemedText.DeprecatedBody>
...@@ -100,9 +100,9 @@ export default function UnstakingModal({ isOpen, onDismiss, stakingInfo }: Staki ...@@ -100,9 +100,9 @@ export default function UnstakingModal({ isOpen, onDismiss, stakingInfo }: Staki
)} )}
{stakingInfo?.earnedAmount && ( {stakingInfo?.earnedAmount && (
<AutoColumn justify="center" gap="md"> <AutoColumn justify="center" gap="md">
<ThemedText.DeprecatedBody fontWeight={600} fontSize={36}> <ThemedText.HeadlineLarge>
<FormattedCurrencyAmount currencyAmount={stakingInfo?.earnedAmount} /> <FormattedCurrencyAmount currencyAmount={stakingInfo?.earnedAmount} />
</ThemedText.DeprecatedBody> </ThemedText.HeadlineLarge>
<ThemedText.DeprecatedBody> <ThemedText.DeprecatedBody>
<Trans>Unclaimed UNI</Trans> <Trans>Unclaimed UNI</Trans>
</ThemedText.DeprecatedBody> </ThemedText.DeprecatedBody>
...@@ -118,7 +118,7 @@ export default function UnstakingModal({ isOpen, onDismiss, stakingInfo }: Staki ...@@ -118,7 +118,7 @@ export default function UnstakingModal({ isOpen, onDismiss, stakingInfo }: Staki
)} )}
{attempting && !hash && ( {attempting && !hash && (
<LoadingView onDismiss={wrappedOnDismiss}> <LoadingView onDismiss={wrappedOnDismiss}>
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<ThemedText.DeprecatedBody fontSize={20}> <ThemedText.DeprecatedBody fontSize={20}>
<Trans>Withdrawing {stakingInfo?.stakedAmount?.toSignificant(4)} UNI-V2</Trans> <Trans>Withdrawing {stakingInfo?.stakedAmount?.toSignificant(4)} UNI-V2</Trans>
</ThemedText.DeprecatedBody> </ThemedText.DeprecatedBody>
...@@ -130,7 +130,7 @@ export default function UnstakingModal({ isOpen, onDismiss, stakingInfo }: Staki ...@@ -130,7 +130,7 @@ export default function UnstakingModal({ isOpen, onDismiss, stakingInfo }: Staki
)} )}
{hash && ( {hash && (
<SubmittedView onDismiss={wrappedOnDismiss} hash={hash}> <SubmittedView onDismiss={wrappedOnDismiss} hash={hash}>
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<ThemedText.DeprecatedLargeHeader> <ThemedText.DeprecatedLargeHeader>
<Trans>Transaction Submitted</Trans> <Trans>Transaction Submitted</Trans>
</ThemedText.DeprecatedLargeHeader> </ThemedText.DeprecatedLargeHeader>
......
...@@ -64,7 +64,7 @@ export function AdvancedSwapDetails({ ...@@ -64,7 +64,7 @@ export function AdvancedSwapDetails({
return !trade ? null : ( return !trade ? null : (
<StyledCard> <StyledCard>
<AutoColumn gap="8px"> <AutoColumn gap="sm">
<RowBetween> <RowBetween>
<RowFixed> <RowFixed>
<MouseoverTooltip <MouseoverTooltip
......
...@@ -24,7 +24,7 @@ export default function PriceImpactWarning({ priceImpact }: PriceImpactWarningPr ...@@ -24,7 +24,7 @@ export default function PriceImpactWarning({ priceImpact }: PriceImpactWarningPr
return ( return (
<StyledCard> <StyledCard>
<AutoColumn gap="8px"> <AutoColumn gap="sm">
<MouseoverTooltip <MouseoverTooltip
text={ text={
<Trans> <Trans>
......
...@@ -129,7 +129,7 @@ export default function SwapDetailsDropdown({ ...@@ -129,7 +129,7 @@ export default function SwapDetailsDropdown({
return ( return (
<Wrapper style={{ marginTop: '0' }}> <Wrapper style={{ marginTop: '0' }}>
<AutoColumn gap="8px" style={{ width: '100%', marginBottom: '-8px' }}> <AutoColumn gap="sm" style={{ width: '100%', marginBottom: '-8px' }}>
<TraceEvent <TraceEvent
events={[BrowserEvent.onClick]} events={[BrowserEvent.onClick]}
name={EventName.SWAP_DETAILS_EXPANDED} name={EventName.SWAP_DETAILS_EXPANDED}
...@@ -201,7 +201,7 @@ export default function SwapDetailsDropdown({ ...@@ -201,7 +201,7 @@ export default function SwapDetailsDropdown({
</StyledHeaderRow> </StyledHeaderRow>
</TraceEvent> </TraceEvent>
<AnimatedDropdown open={showDetails}> <AnimatedDropdown open={showDetails}>
<AutoColumn gap="8px" style={{ padding: '0', paddingBottom: '8px' }}> <AutoColumn gap="sm" style={{ padding: '0', paddingBottom: '8px' }}>
{trade ? ( {trade ? (
<StyledCard> <StyledCard>
<AdvancedSwapDetails trade={trade} allowedSlippage={allowedSlippage} syncing={syncing} /> <AdvancedSwapDetails trade={trade} allowedSlippage={allowedSlippage} syncing={syncing} />
......
...@@ -101,7 +101,7 @@ export default function SwapModalHeader({ ...@@ -101,7 +101,7 @@ export default function SwapModalHeader({
return ( return (
<AutoColumn gap="4px" style={{ marginTop: '1rem' }}> <AutoColumn gap="4px" style={{ marginTop: '1rem' }}>
<LightCard padding="0.75rem 1rem"> <LightCard padding="0.75rem 1rem">
<AutoColumn gap="8px"> <AutoColumn gap="sm">
<RowBetween align="center"> <RowBetween align="center">
<RowFixed gap="0px"> <RowFixed gap="0px">
<TruncatedText <TruncatedText
...@@ -128,7 +128,7 @@ export default function SwapModalHeader({ ...@@ -128,7 +128,7 @@ export default function SwapModalHeader({
<ArrowDown size="16" color={theme.textPrimary} /> <ArrowDown size="16" color={theme.textPrimary} />
</ArrowWrapper> </ArrowWrapper>
<LightCard padding="0.75rem 1rem" style={{ marginBottom: '0.25rem' }}> <LightCard padding="0.75rem 1rem" style={{ marginBottom: '0.25rem' }}>
<AutoColumn gap="8px"> <AutoColumn gap="sm">
<RowBetween align="flex-end"> <RowBetween align="flex-end">
<RowFixed gap="0px"> <RowFixed gap="0px">
<TruncatedText fontSize={24} fontWeight={500}> <TruncatedText fontSize={24} fontWeight={500}>
......
...@@ -120,7 +120,7 @@ export default function DelegateModal({ isOpen, onDismiss, title }: VoteModalPro ...@@ -120,7 +120,7 @@ export default function DelegateModal({ isOpen, onDismiss, title }: VoteModalPro
)} )}
{attempting && !hash && ( {attempting && !hash && (
<LoadingView onDismiss={wrappedOnDismiss}> <LoadingView onDismiss={wrappedOnDismiss}>
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<ThemedText.DeprecatedLargeHeader> <ThemedText.DeprecatedLargeHeader>
{usingDelegate ? <Trans>Delegating votes</Trans> : <Trans>Unlocking Votes</Trans>} {usingDelegate ? <Trans>Delegating votes</Trans> : <Trans>Unlocking Votes</Trans>}
</ThemedText.DeprecatedLargeHeader> </ThemedText.DeprecatedLargeHeader>
...@@ -130,7 +130,7 @@ export default function DelegateModal({ isOpen, onDismiss, title }: VoteModalPro ...@@ -130,7 +130,7 @@ export default function DelegateModal({ isOpen, onDismiss, title }: VoteModalPro
)} )}
{hash && ( {hash && (
<SubmittedView onDismiss={wrappedOnDismiss} hash={hash}> <SubmittedView onDismiss={wrappedOnDismiss} hash={hash}>
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<ThemedText.DeprecatedLargeHeader> <ThemedText.DeprecatedLargeHeader>
<Trans>Transaction Submitted</Trans> <Trans>Transaction Submitted</Trans>
</ThemedText.DeprecatedLargeHeader> </ThemedText.DeprecatedLargeHeader>
......
...@@ -109,7 +109,7 @@ export default function ExecuteModal({ isOpen, onDismiss, proposalId }: ExecuteM ...@@ -109,7 +109,7 @@ export default function ExecuteModal({ isOpen, onDismiss, proposalId }: ExecuteM
<CustomLightSpinner src={Circle} alt="loader" size="90px" /> <CustomLightSpinner src={Circle} alt="loader" size="90px" />
</ConfirmedIcon> </ConfirmedIcon>
<AutoColumn gap="100px" justify="center"> <AutoColumn gap="100px" justify="center">
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<ThemedText.DeprecatedLargeHeader> <ThemedText.DeprecatedLargeHeader>
<Trans>Executing</Trans> <Trans>Executing</Trans>
</ThemedText.DeprecatedLargeHeader> </ThemedText.DeprecatedLargeHeader>
...@@ -130,7 +130,7 @@ export default function ExecuteModal({ isOpen, onDismiss, proposalId }: ExecuteM ...@@ -130,7 +130,7 @@ export default function ExecuteModal({ isOpen, onDismiss, proposalId }: ExecuteM
<ArrowUpCircle strokeWidth={0.5} size={90} color={theme.deprecated_primary1} /> <ArrowUpCircle strokeWidth={0.5} size={90} color={theme.deprecated_primary1} />
</ConfirmedIcon> </ConfirmedIcon>
<AutoColumn gap="100px" justify="center"> <AutoColumn gap="100px" justify="center">
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<ThemedText.DeprecatedLargeHeader> <ThemedText.DeprecatedLargeHeader>
<Trans>Execution Submitted</Trans> <Trans>Execution Submitted</Trans>
</ThemedText.DeprecatedLargeHeader> </ThemedText.DeprecatedLargeHeader>
......
...@@ -109,7 +109,7 @@ export default function QueueModal({ isOpen, onDismiss, proposalId }: QueueModal ...@@ -109,7 +109,7 @@ export default function QueueModal({ isOpen, onDismiss, proposalId }: QueueModal
<CustomLightSpinner src={Circle} alt="loader" size="90px" /> <CustomLightSpinner src={Circle} alt="loader" size="90px" />
</ConfirmedIcon> </ConfirmedIcon>
<AutoColumn gap="100px" justify="center"> <AutoColumn gap="100px" justify="center">
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<ThemedText.DeprecatedLargeHeader> <ThemedText.DeprecatedLargeHeader>
<Trans>Queueing</Trans> <Trans>Queueing</Trans>
</ThemedText.DeprecatedLargeHeader> </ThemedText.DeprecatedLargeHeader>
...@@ -130,7 +130,7 @@ export default function QueueModal({ isOpen, onDismiss, proposalId }: QueueModal ...@@ -130,7 +130,7 @@ export default function QueueModal({ isOpen, onDismiss, proposalId }: QueueModal
<ArrowUpCircle strokeWidth={0.5} size={90} color={theme.deprecated_primary1} /> <ArrowUpCircle strokeWidth={0.5} size={90} color={theme.deprecated_primary1} />
</ConfirmedIcon> </ConfirmedIcon>
<AutoColumn gap="100px" justify="center"> <AutoColumn gap="100px" justify="center">
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<ThemedText.DeprecatedLargeHeader> <ThemedText.DeprecatedLargeHeader>
<Trans>Transaction Submitted</Trans> <Trans>Transaction Submitted</Trans>
</ThemedText.DeprecatedLargeHeader> </ThemedText.DeprecatedLargeHeader>
......
...@@ -123,7 +123,7 @@ export default function VoteModal({ isOpen, onDismiss, proposalId, voteOption }: ...@@ -123,7 +123,7 @@ export default function VoteModal({ isOpen, onDismiss, proposalId, voteOption }:
<CustomLightSpinner src={Circle} alt="loader" size="90px" /> <CustomLightSpinner src={Circle} alt="loader" size="90px" />
</ConfirmedIcon> </ConfirmedIcon>
<AutoColumn gap="100px" justify="center"> <AutoColumn gap="100px" justify="center">
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<ThemedText.DeprecatedLargeHeader> <ThemedText.DeprecatedLargeHeader>
<Trans>Submitting Vote</Trans> <Trans>Submitting Vote</Trans>
</ThemedText.DeprecatedLargeHeader> </ThemedText.DeprecatedLargeHeader>
...@@ -144,7 +144,7 @@ export default function VoteModal({ isOpen, onDismiss, proposalId, voteOption }: ...@@ -144,7 +144,7 @@ export default function VoteModal({ isOpen, onDismiss, proposalId, voteOption }:
<ArrowUpCircle strokeWidth={0.5} size={90} color={theme.deprecated_primary1} /> <ArrowUpCircle strokeWidth={0.5} size={90} color={theme.deprecated_primary1} />
</ConfirmedIcon> </ConfirmedIcon>
<AutoColumn gap="100px" justify="center"> <AutoColumn gap="100px" justify="center">
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<ThemedText.DeprecatedLargeHeader> <ThemedText.DeprecatedLargeHeader>
<Trans>Transaction Submitted</Trans> <Trans>Transaction Submitted</Trans>
</ThemedText.DeprecatedLargeHeader> </ThemedText.DeprecatedLargeHeader>
......
...@@ -849,7 +849,7 @@ export default function AddLiquidity() { ...@@ -849,7 +849,7 @@ export default function AddLiquidity() {
border: '1px solid', border: '1px solid',
}} }}
> >
<AutoColumn gap="8px" style={{ height: '100%' }}> <AutoColumn gap="sm" style={{ height: '100%' }}>
<RowFixed> <RowFixed>
<AlertTriangle stroke={theme.deprecated_yellow3} size="16px" /> <AlertTriangle stroke={theme.deprecated_yellow3} size="16px" />
<ThemedText.DeprecatedYellow ml="12px" fontSize="15px"> <ThemedText.DeprecatedYellow ml="12px" fontSize="15px">
......
...@@ -24,7 +24,7 @@ export const ProposalSubmissionModal = ({ ...@@ -24,7 +24,7 @@ export const ProposalSubmissionModal = ({
<Modal isOpen={isOpen} onDismiss={onDismiss}> <Modal isOpen={isOpen} onDismiss={onDismiss}>
{!hash ? ( {!hash ? (
<LoadingView onDismiss={onDismiss}> <LoadingView onDismiss={onDismiss}>
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<ThemedText.DeprecatedLargeHeader> <ThemedText.DeprecatedLargeHeader>
<Trans>Submitting Proposal</Trans> <Trans>Submitting Proposal</Trans>
</ThemedText.DeprecatedLargeHeader> </ThemedText.DeprecatedLargeHeader>
...@@ -32,7 +32,7 @@ export const ProposalSubmissionModal = ({ ...@@ -32,7 +32,7 @@ export const ProposalSubmissionModal = ({
</LoadingView> </LoadingView>
) : ( ) : (
<SubmittedView onDismiss={onDismiss} hash={hash}> <SubmittedView onDismiss={onDismiss} hash={hash}>
<AutoColumn gap="12px" justify="center"> <AutoColumn gap="md" justify="center">
<Text fontWeight={500} fontSize={20} textAlign="center"> <Text fontWeight={500} fontSize={20} textAlign="center">
<Trans>Proposal Submitted</Trans> <Trans>Proposal Submitted</Trans>
</Text> </Text>
......
...@@ -76,7 +76,7 @@ function LiquidityInfo({ ...@@ -76,7 +76,7 @@ function LiquidityInfo({
const currency1 = unwrappedToken(token1Amount.currency) const currency1 = unwrappedToken(token1Amount.currency)
return ( return (
<AutoColumn gap="8px"> <AutoColumn gap="sm">
<RowBetween> <RowBetween>
<RowFixed> <RowFixed>
<CurrencyLogo size="20px" style={{ marginRight: '8px' }} currency={currency0} /> <CurrencyLogo size="20px" style={{ marginRight: '8px' }} currency={currency0} />
...@@ -457,7 +457,7 @@ function V2PairMigration({ ...@@ -457,7 +457,7 @@ function V2PairMigration({
</ThemedText.DeprecatedBody> </ThemedText.DeprecatedBody>
{v2SpotPrice && ( {v2SpotPrice && (
<AutoColumn gap="8px" style={{ marginTop: '12px' }}> <AutoColumn gap="sm" style={{ marginTop: '12px' }}>
<RowBetween> <RowBetween>
<ThemedText.DeprecatedBody fontWeight={500} fontSize={14}> <ThemedText.DeprecatedBody fontWeight={500} fontSize={14}>
<Trans> <Trans>
...@@ -475,7 +475,7 @@ function V2PairMigration({ ...@@ -475,7 +475,7 @@ function V2PairMigration({
{largePriceDifference ? ( {largePriceDifference ? (
<YellowCard> <YellowCard>
<AutoColumn gap="8px"> <AutoColumn gap="sm">
<RowBetween> <RowBetween>
<ThemedText.DeprecatedBody fontSize={14}> <ThemedText.DeprecatedBody fontSize={14}>
<Trans> <Trans>
...@@ -603,9 +603,9 @@ function V2PairMigration({ ...@@ -603,9 +603,9 @@ function V2PairMigration({
</DarkGrayCard> </DarkGrayCard>
) : null} ) : null}
<AutoColumn gap="12px"> <AutoColumn gap="md">
{!isSuccessfullyMigrated && !isMigrationPending ? ( {!isSuccessfullyMigrated && !isMigrationPending ? (
<AutoColumn gap="12px" style={{ flex: '1' }}> <AutoColumn gap="md" style={{ flex: '1' }}>
<ButtonConfirmed <ButtonConfirmed
confirmed={approval === ApprovalState.APPROVED || signatureData !== null} confirmed={approval === ApprovalState.APPROVED || signatureData !== null}
disabled={ disabled={
...@@ -630,7 +630,7 @@ function V2PairMigration({ ...@@ -630,7 +630,7 @@ function V2PairMigration({
</ButtonConfirmed> </ButtonConfirmed>
</AutoColumn> </AutoColumn>
) : null} ) : null}
<AutoColumn gap="12px" style={{ flex: '1' }}> <AutoColumn gap="md" style={{ flex: '1' }}>
<ButtonConfirmed <ButtonConfirmed
confirmed={isSuccessfullyMigrated} confirmed={isSuccessfullyMigrated}
disabled={ disabled={
......
...@@ -173,7 +173,7 @@ function CurrentPriceCard({ ...@@ -173,7 +173,7 @@ function CurrentPriceCard({
return ( return (
<LightCard padding="12px "> <LightCard padding="12px ">
<AutoColumn gap="8px" justify="center"> <AutoColumn gap="sm" justify="center">
<ExtentsText> <ExtentsText>
<Trans>Current price</Trans> <Trans>Current price</Trans>
</ExtentsText> </ExtentsText>
...@@ -881,7 +881,7 @@ export function PositionPage() { ...@@ -881,7 +881,7 @@ export function PositionPage() {
<RowBetween> <RowBetween>
<LightCard padding="12px" width="100%"> <LightCard padding="12px" width="100%">
<AutoColumn gap="8px" justify="center"> <AutoColumn gap="sm" justify="center">
<ExtentsText> <ExtentsText>
<Trans>Min price</Trans> <Trans>Min price</Trans>
</ExtentsText> </ExtentsText>
...@@ -905,7 +905,7 @@ export function PositionPage() { ...@@ -905,7 +905,7 @@ export function PositionPage() {
<DoubleArrow></DoubleArrow> <DoubleArrow></DoubleArrow>
<LightCard padding="12px" width="100%"> <LightCard padding="12px" width="100%">
<AutoColumn gap="8px" justify="center"> <AutoColumn gap="sm" justify="center">
<ExtentsText> <ExtentsText>
<Trans>Max price</Trans> <Trans>Max price</Trans>
</ExtentsText> </ExtentsText>
......
...@@ -410,7 +410,7 @@ function Remove({ tokenId }: { tokenId: BigNumber }) { ...@@ -410,7 +410,7 @@ function Remove({ tokenId }: { tokenId: BigNumber }) {
)} )}
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<AutoColumn gap="12px" style={{ flex: '1' }}> <AutoColumn gap="md" style={{ flex: '1' }}>
<ButtonConfirmed <ButtonConfirmed
confirmed={false} confirmed={false}
disabled={removed || percent === 0 || !liquidityValue0} disabled={removed || percent === 0 || !liquidityValue0}
......
...@@ -189,7 +189,6 @@ export default function Swap() { ...@@ -189,7 +189,6 @@ export default function Swap() {
// for expert mode // for expert mode
const [isExpertMode] = useExpertModeManager() const [isExpertMode] = useExpertModeManager()
// swap state // swap state
const { independentField, typedValue, recipient } = useSwapState() const { independentField, typedValue, recipient } = useSwapState()
const { const {
...@@ -496,7 +495,6 @@ export default function Swap() { ...@@ -496,7 +495,6 @@ export default function Swap() {
const showDetailsDropdown = Boolean( const showDetailsDropdown = Boolean(
!showWrap && userHasSpecifiedInputOutput && (trade || routeIsLoading || routeIsSyncing) !showWrap && userHasSpecifiedInputOutput && (trade || routeIsLoading || routeIsSyncing)
) )
return ( return (
<Trace page={PageName.SWAP_PAGE} shouldLogImpression> <Trace page={PageName.SWAP_PAGE} shouldLogImpression>
<> <>
...@@ -578,7 +576,7 @@ export default function Swap() { ...@@ -578,7 +576,7 @@ export default function Swap() {
</TraceEvent> </TraceEvent>
</ArrowWrapper> </ArrowWrapper>
</div> </div>
<AutoColumn gap="12px"> <AutoColumn gap="md">
<div> <div>
<OutputSwapSection showDetailsDropdown={showDetailsDropdown}> <OutputSwapSection showDetailsDropdown={showDetailsDropdown}>
<Trace section={SectionName.CURRENCY_OUTPUT_PANEL}> <Trace section={SectionName.CURRENCY_OUTPUT_PANEL}>
......
...@@ -2,7 +2,15 @@ import { Trans } from '@lingui/macro' ...@@ -2,7 +2,15 @@ import { Trans } from '@lingui/macro'
import { outboundLink } from 'components/analytics' import { outboundLink } from 'components/analytics'
import { MOBILE_MEDIA_BREAKPOINT } from 'components/Tokens/constants' import { MOBILE_MEDIA_BREAKPOINT } from 'components/Tokens/constants'
import useCopyClipboard from 'hooks/useCopyClipboard' import useCopyClipboard from 'hooks/useCopyClipboard'
import React, { forwardRef, HTMLProps, ReactNode, useCallback, useImperativeHandle, useState } from 'react' import React, {
forwardRef,
HTMLProps,
PropsWithChildren,
ReactNode,
useCallback,
useImperativeHandle,
useState,
} from 'react'
import { import {
ArrowLeft, ArrowLeft,
CheckCircle, CheckCircle,
...@@ -250,19 +258,27 @@ const CopyIconWrapper = styled.div` ...@@ -250,19 +258,27 @@ const CopyIconWrapper = styled.div`
display: flex; display: flex;
` `
export function CopyLinkIcon({ toCopy }: { toCopy: string }) { export function CopyToClipboard({ toCopy, children }: PropsWithChildren<{ toCopy: string }>) {
const [isCopied, setCopied] = useCopyClipboard() const [isCopied, setCopied] = useCopyClipboard()
const copy = useCallback(() => { const copy = useCallback(() => {
setCopied(toCopy) setCopied(toCopy)
}, [toCopy, setCopied]) }, [toCopy, setCopied])
return ( return (
<CopyIconWrapper onClick={copy}> <CopyIconWrapper onClick={copy}>
<CopyIcon /> {children}
{isCopied && <Tooltip isCopyContractTooltip={false} />} {isCopied && <Tooltip isCopyContractTooltip={false} />}
</CopyIconWrapper> </CopyIconWrapper>
) )
} }
export function CopyLinkIcon({ toCopy }: { toCopy: string }) {
return (
<CopyToClipboard toCopy={toCopy}>
<CopyIcon />
</CopyToClipboard>
)
}
const FullAddress = styled.span` const FullAddress = styled.span`
@media only screen and (max-width: ${MOBILE_MEDIA_BREAKPOINT}) { @media only screen and (max-width: ${MOBILE_MEDIA_BREAKPOINT}) {
display: none; display: none;
......
...@@ -31,6 +31,9 @@ export const ThemedText = { ...@@ -31,6 +31,9 @@ export const ThemedText = {
HeadlineSmall(props: TextProps) { HeadlineSmall(props: TextProps) {
return <TextWrapper fontWeight={600} fontSize={20} lineHeight="28px" color="textPrimary" {...props} /> return <TextWrapper fontWeight={600} fontSize={20} lineHeight="28px" color="textPrimary" {...props} />
}, },
HeadlineLarge(props: TextProps) {
return <TextWrapper fontWeight={600} fontSize={36} lineHeight="44px" color="textPrimary" {...props} />
},
LargeHeader(props: TextProps) { LargeHeader(props: TextProps) {
return <TextWrapper fontWeight={400} fontSize={36} color="textPrimary" {...props} /> return <TextWrapper fontWeight={400} fontSize={36} color="textPrimary" {...props} />
}, },
...@@ -41,6 +44,7 @@ export const ThemedText = { ...@@ -41,6 +44,7 @@ export const ThemedText = {
return <TextWrapper fontWeight={400} fontSize={20} color="textPrimary" {...props} /> return <TextWrapper fontWeight={400} fontSize={20} color="textPrimary" {...props} />
}, },
SubHeader(props: TextProps) { SubHeader(props: TextProps) {
// @todo designs use `fontWeight: 500` and we currently have a mix of 600 and 500
return <TextWrapper fontWeight={600} fontSize={16} color="textPrimary" {...props} /> return <TextWrapper fontWeight={600} fontSize={16} color="textPrimary" {...props} />
}, },
SubHeaderSmall(props: TextProps) { SubHeaderSmall(props: TextProps) {
......
...@@ -49,6 +49,10 @@ const opacities = { ...@@ -49,6 +49,10 @@ const opacities = {
enabled: 1, enabled: 1,
} }
const fonts = {
code: 'courier, courier new, serif',
}
const deprecated_mediaWidthTemplates: { [width in keyof typeof MEDIA_WIDTHS]: typeof css } = Object.keys( const deprecated_mediaWidthTemplates: { [width in keyof typeof MEDIA_WIDTHS]: typeof css } = Object.keys(
MEDIA_WIDTHS MEDIA_WIDTHS
).reduce((accumulator, size) => { ).reduce((accumulator, size) => {
...@@ -63,10 +67,12 @@ const deprecated_mediaWidthTemplates: { [width in keyof typeof MEDIA_WIDTHS]: ty ...@@ -63,10 +67,12 @@ const deprecated_mediaWidthTemplates: { [width in keyof typeof MEDIA_WIDTHS]: ty
function getSettings(darkMode: boolean) { function getSettings(darkMode: boolean) {
return { return {
grids: { grids: {
sm: 8, sm: '8px',
md: 12, md: '12px',
lg: 24, lg: '24px',
xl: '32px',
}, },
fonts,
// shadows // shadows
shadow1: darkMode ? '#000' : '#2F80ED', shadow1: darkMode ? '#000' : '#2F80ED',
......
...@@ -2974,47 +2974,47 @@ ...@@ -2974,47 +2974,47 @@
estree-walker "^1.0.1" estree-walker "^1.0.1"
picomatch "^2.2.2" picomatch "^2.2.2"
"@sentry/browser@7.23.0": "@sentry/browser@7.20.1":
version "7.23.0" version "7.20.1"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.23.0.tgz#ca2a01ce2b00727036906158efaa1c7af1395cc0" resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.20.1.tgz#bce606db24fa02fb72e71187e510ff890f8be903"
integrity sha512-2/dLGOSaM5AvlRdMgYxDyxPxkUUqYyxF7QZ0NicdIXkKXa0fM38IdibeXrE8XzC7rF2B7DQZ6U7uDb1Yry60ig== integrity sha512-SE6mI4LkMzjEi5KB02Py24e2bKYZc/HZI/ZlTn36BuUQX/KYhzzKwzXucOJ5Qws9Ar9CViyKJDb07LxVQLYCGw==
dependencies: dependencies:
"@sentry/core" "7.23.0" "@sentry/core" "7.20.1"
"@sentry/types" "7.23.0" "@sentry/types" "7.20.1"
"@sentry/utils" "7.23.0" "@sentry/utils" "7.20.1"
tslib "^1.9.3" tslib "^1.9.3"
"@sentry/core@7.23.0": "@sentry/core@7.20.1":
version "7.23.0" version "7.20.1"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.23.0.tgz#d320b2b6e5620b41f345bc01d69b547cdf28f78d" resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.20.1.tgz#b06f36dddba96e2cc7dfa2d24cb72ff39ecd7a59"
integrity sha512-oNLGsscSdMs1urCbpwe868NsoJWyeTOQXOm5w2e78yE7G6zm2Ra473NQio3lweaEvjQgSGpFyEfAn/3ubZbtPw== integrity sha512-Sc7vtNgO4QcE683qrR+b+KFQkkhvQv7gizN46QQPOWeqLDrai7x0+NspTFDLJyvdDuDh2rjoLfRwNsgbwe7Erw==
dependencies: dependencies:
"@sentry/types" "7.23.0" "@sentry/types" "7.20.1"
"@sentry/utils" "7.23.0" "@sentry/utils" "7.20.1"
tslib "^1.9.3" tslib "^1.9.3"
"@sentry/react@^7.23.0": "@sentry/react@7.20.1":
version "7.23.0" version "7.20.1"
resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.23.0.tgz#950487365a696d2506c3103f44be8a64f0e79cda" resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.20.1.tgz#8daef21da5706f5ce68147c555aa19dc12f8b2cf"
integrity sha512-MY8WhhImMYEbF8YMPHxs/fhQ9DftmWz1KxT52jEcZUAYfbwmt8zVy4LfBUpMNA4rFy72E9k4DsFQtD0FwCcp3g== integrity sha512-5oTRFVkfOe8t7dQtN6oi6WZVFE9iBZKgYcLTaPTCg/5yl5RehitHDxXQRCmv8h1XWF9t3AAopf6rMR/tSdOI1A==
dependencies: dependencies:
"@sentry/browser" "7.23.0" "@sentry/browser" "7.20.1"
"@sentry/types" "7.23.0" "@sentry/types" "7.20.1"
"@sentry/utils" "7.23.0" "@sentry/utils" "7.20.1"
hoist-non-react-statics "^3.3.2" hoist-non-react-statics "^3.3.2"
tslib "^1.9.3" tslib "^1.9.3"
"@sentry/types@7.23.0": "@sentry/types@7.20.1":
version "7.23.0" version "7.20.1"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.23.0.tgz#5d2ce94d81d7c1fad702645306f3c0932708cad5" resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.20.1.tgz#26c6fc94dd25a66aeabbd795fa8985d768190970"
integrity sha512-fZ5XfVRswVZhKoCutQ27UpIHP16tvyc6ws+xq+njHv8Jg8gFBCoOxlJxuFhegD2xxylAn1aiSHNAErFWdajbpA== integrity sha512-bI4t5IXGLIQYH5MegKRl4x2LDSlPVbQJ5eE6NJCMrCm8PcFUo3WgkwP6toG9ThQwpTx/DhUo1sVNKrr0oW4cpA==
"@sentry/utils@7.23.0": "@sentry/utils@7.20.1":
version "7.23.0" version "7.20.1"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.23.0.tgz#5f38640fe49f5abac88f048b92d3e83375d7ddf7" resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.20.1.tgz#01b881b82598fca5c04af771ffe44663b66dee6f"
integrity sha512-ad/XXH03MfgDH/7N7FjKEOVaKrfQWdMaE0nCxZCr2RrvlitlmGQmPpms95epr1CpzSU3BDRImlILx6+TlrXOgg== integrity sha512-wToW0710OijQLUZnbbOx1pxwJ4mXUZ5ZFl4/x7ubNftkOz5NwJ+F3ylRqHXpZJaR9pUfR5CNdInTFZn05h/KeQ==
dependencies: dependencies:
"@sentry/types" "7.23.0" "@sentry/types" "7.20.1"
tslib "^1.9.3" tslib "^1.9.3"
"@sinonjs/commons@^1.7.0": "@sinonjs/commons@^1.7.0":
......
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