feat: add learn more button (#5572)
* fix pointer * buttons * fix gap * buttons wrapper * order
This commit is contained in:
parent
28d6c6454e
commit
049a7d1d6a
@ -7,7 +7,7 @@ import { RowBetween } from '../Row'
|
|||||||
|
|
||||||
type ButtonProps = Omit<ButtonPropsOriginal, 'css'>
|
type ButtonProps = Omit<ButtonPropsOriginal, 'css'>
|
||||||
|
|
||||||
const BaseButton = styled(RebassButton)<
|
export const BaseButton = styled(RebassButton)<
|
||||||
{
|
{
|
||||||
padding?: string
|
padding?: string
|
||||||
width?: string
|
width?: string
|
||||||
@ -211,30 +211,15 @@ export const ButtonEmpty = styled(BaseButton)`
|
|||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
export const ButtonCTA = styled(BaseButton)<{ redesignFlag?: boolean }>`
|
|
||||||
background: linear-gradient(10deg, rgba(255, 0, 199, 1) 0%, rgba(255, 159, 251, 1) 100%);
|
|
||||||
width: fit-content;
|
|
||||||
border-radius: 24px;
|
|
||||||
border: none;
|
|
||||||
padding: 16px 77.5px;
|
|
||||||
margin-left: 12px;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
color: ${({ theme }) => theme.white};
|
|
||||||
&:hover {
|
|
||||||
opacity: 75%;
|
|
||||||
}
|
|
||||||
`
|
|
||||||
export const ButtonText = styled(BaseButton)`
|
export const ButtonText = styled(BaseButton)`
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
background: none;
|
background: none;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
&:focus {
|
&:focus {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
&:hover {
|
&:hover {
|
||||||
// text-decoration: underline;
|
|
||||||
opacity: 0.9;
|
opacity: 0.9;
|
||||||
}
|
}
|
||||||
&:active {
|
&:active {
|
||||||
|
@ -30,8 +30,9 @@ export const SwapWrapper = styled.main<{ margin?: string; maxWidth?: string; ope
|
|||||||
border: 1px solid ${({ theme }) => theme.backgroundOutline};
|
border: 1px solid ${({ theme }) => theme.backgroundOutline};
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
z-index: ${Z_INDEX.deprecated_content};
|
z-index: ${Z_INDEX.deprecated_content};
|
||||||
cursor: ${({ open }) => (open ? 'pointer' : 'suto')};
|
cursor: ${({ open }) => open && 'pointer'};
|
||||||
transition: transform 250ms ease;
|
transition: transform 250ms ease;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
border: 1px solid ${({ theme, open }) => (open ? theme.accentAction : theme.backgroundOutline)};
|
border: 1px solid ${({ theme, open }) => (open ? theme.accentAction : theme.backgroundOutline)};
|
||||||
transform: ${({ open }) => (open ? `translateY(-4px)` : `none`)};
|
transform: ${({ open }) => (open ? `translateY(-4px)` : `none`)};
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { ButtonCTA } from 'components/Button'
|
import { BaseButton } from 'components/Button'
|
||||||
|
import { LandingPageVariant, useLandingPageFlag } from 'featureFlags/flags/landingPage'
|
||||||
import Swap from 'pages/Swap'
|
import Swap from 'pages/Swap'
|
||||||
import { PropsWithChildren } from 'react'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { Link } from 'react-router-dom'
|
import { Link } from 'react-router-dom'
|
||||||
import { useIsDarkMode } from 'state/user/hooks'
|
import { useIsDarkMode } from 'state/user/hooks'
|
||||||
import styled from 'styled-components/macro'
|
import styled from 'styled-components/macro'
|
||||||
@ -71,7 +72,28 @@ const SubText = styled.h3`
|
|||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
const Button = styled(ButtonCTA)`
|
const CTAButton = styled(BaseButton)`
|
||||||
|
padding: 16px;
|
||||||
|
border-radius: 24px;
|
||||||
|
color: ${({ theme }) => theme.white};
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
opacity: 50%;
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
|
const ButtonCTA = styled(CTAButton)`
|
||||||
|
background: linear-gradient(10deg, rgba(255, 0, 199, 1) 0%, rgba(255, 159, 251, 1) 100%);
|
||||||
|
border: none;
|
||||||
|
`
|
||||||
|
|
||||||
|
const ButtonCTASecondary = styled(CTAButton)`
|
||||||
|
background: none;
|
||||||
|
border: ${({ theme }) => `1px solid ${theme.textPrimary}`};
|
||||||
|
`
|
||||||
|
|
||||||
|
const ButtonCTAText = styled.p`
|
||||||
|
margin: 0px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
@ -84,29 +106,45 @@ const Button = styled(ButtonCTA)`
|
|||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
const TitleContentWrapper = styled.span`
|
const TitleWrapper = styled.span`
|
||||||
max-width: 720px;
|
max-width: 720px;
|
||||||
`
|
`
|
||||||
|
|
||||||
const ContentWrapper = styled.span`
|
const ActionsWrapper = styled.span`
|
||||||
max-width: 720px;
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 24px;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
& > * {
|
||||||
|
max-width: 288px;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
export default function Landing(props: PropsWithChildren) {
|
export default function Landing() {
|
||||||
const isDarkMode = useIsDarkMode()
|
const isDarkMode = useIsDarkMode()
|
||||||
|
|
||||||
|
const location = useLocation()
|
||||||
|
const isOpen = location.pathname === '/'
|
||||||
|
|
||||||
|
if (useLandingPageFlag() === LandingPageVariant.Control || !isOpen) return null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageWrapper isDarkMode={isDarkMode}>
|
<PageWrapper isDarkMode={isDarkMode}>
|
||||||
<TitleContentWrapper>
|
<TitleWrapper>
|
||||||
<TitleText isDarkMode={isDarkMode}>Trade crypto & NFTs with confidence.</TitleText>
|
<TitleText isDarkMode={isDarkMode}>Trade crypto & NFTs with confidence.</TitleText>
|
||||||
<SubText>Uniswap is the best way to buy, sell, and manage your tokens and NFTs.</SubText>
|
<SubText>Uniswap is the best way to buy, sell, and manage your tokens and NFTs.</SubText>
|
||||||
</TitleContentWrapper>
|
</TitleWrapper>
|
||||||
<ContentWrapper>
|
<ActionsWrapper>
|
||||||
<Button as={Link} to="/swap">
|
<ButtonCTA as={Link} to="/swap">
|
||||||
Continue
|
<ButtonCTAText>Continue</ButtonCTAText>
|
||||||
</Button>
|
</ButtonCTA>
|
||||||
</ContentWrapper>
|
<ButtonCTASecondary as={Link} to="/about">
|
||||||
|
<ButtonCTAText>Learn More</ButtonCTAText>
|
||||||
|
</ButtonCTASecondary>
|
||||||
|
</ActionsWrapper>
|
||||||
</PageWrapper>
|
</PageWrapper>
|
||||||
<Swap />
|
<Swap />
|
||||||
</>
|
</>
|
||||||
|
Loading…
Reference in New Issue
Block a user