Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
049a7d1d
Unverified
Commit
049a7d1d
authored
Dec 07, 2022
by
Vignesh Mohankumar
Committed by
GitHub
Dec 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add learn more button (#5572)
* fix pointer * buttons * fix gap * buttons wrapper * order
parent
28d6c645
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
31 deletions
+55
-31
index.tsx
src/components/Button/index.tsx
+1
-16
styleds.tsx
src/components/swap/styleds.tsx
+2
-1
index.tsx
src/pages/Landing/index.tsx
+52
-14
No files found.
src/components/Button/index.tsx
View file @
049a7d1d
...
@@ -7,7 +7,7 @@ import { RowBetween } from '../Row'
...
@@ -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)`
...
@@ -211,30 +211,15 @@ export const ButtonEmpty = styled(BaseButton)`
}
}
`
`
export const ButtonCTA = styled(BaseButton)<{ redesignFlag?: boolean }>`
background
:
linear
-
gradient
(
10
deg
,
rgba
(
255
,
0
,
199
,
1
)
0
%
,
rgba
(
255
,
159
,
251
,
1
)
100
%
);
width
:
fit
-
content
;
border
-
radius
:
24
px
;
border
:
none
;
padding
:
16
px
77.5
px
;
margin
-
left
:
12
px
;
margin
-
bottom
:
12
px
;
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
{
...
...
src/components/swap/styleds.tsx
View file @
049a7d1d
...
@@ -30,8 +30,9 @@ export const SwapWrapper = styled.main<{ margin?: string; maxWidth?: string; ope
...
@@ -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`
)}
;
...
...
src/pages/Landing/index.tsx
View file @
049a7d1d
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`
...
@@ -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)`
...
@@ -84,29 +106,45 @@ const Button = styled(ButtonCTA)`
}
}
`
`
const
Title
Content
Wrapper
=
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
}
>
<
Title
Content
Wrapper
>
<
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
/>
</>
</>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment