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
5f6e7056
Commit
5f6e7056
authored
Oct 06, 2018
by
Chi Kei Chan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add first currency select panel
parent
7a30c1c8
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
149 additions
and
7 deletions
+149
-7
dropdown-blue.svg
src/assets/images/dropdown-blue.svg
+3
-0
dropdown.svg
src/assets/images/dropdown.svg
+3
-0
currency-panel.scss
src/components/CurrencyInputPanel/currency-panel.scss
+83
-0
index.js
src/components/CurrencyInputPanel/index.js
+34
-0
index.js
src/components/NavigationTabs/index.js
+3
-1
index.js
src/components/Tab/index.js
+1
-1
tab.scss
src/components/Tab/tab.scss
+10
-3
index.js
src/pages/Swap/index.js
+3
-1
swap.scss
src/pages/Swap/swap.scss
+5
-0
variables.scss
src/variables.scss
+4
-1
No files found.
src/assets/images/dropdown-blue.svg
0 → 100644
View file @
5f6e7056
<svg
width=
"12"
height=
"7"
viewBox=
"0 0 12 7"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"M0.97168 1L6.20532 6L11.439 1"
stroke=
"#2F80ED"
/>
</svg>
src/assets/images/dropdown.svg
0 → 100644
View file @
5f6e7056
<svg
width=
"12"
height=
"7"
viewBox=
"0 0 12 7"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"M0.97168 1L6.20532 6L11.439 1"
stroke=
"#AEAEAE"
/>
</svg>
src/components/CurrencyInputPanel/currency-panel.scss
0 → 100644
View file @
5f6e7056
@import
'../../variables.scss'
;
.currency-input-panel
{
@extend
%col-nowrap
;
&
__container
{
border-radius
:
1
.25rem
;
border
:
1px
solid
$mercury-gray
;
background-color
:
$white
;
box-shadow
:
0px
4px
4px
0px
rgba
(
$royal-blue
,
0
.05
);
}
&
__label-row
{
@extend
%row-nowrap
;
align-items
:
center
;
color
:
$dove-gray
;
font-size
:
.75rem
;
line-height
:
1rem
;
padding
:
.75rem
1rem
;
}
&
__label-container
{
flex
:
1
1
auto
;
width
:
0
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
&
__label-description
{
opacity
:
.75
;
margin-left
:
.25rem
;
}
&
__input-row
{
@extend
%row-nowrap
;
align-items
:
center
;
padding
:
.25rem
.85rem
.75rem
;
}
&
__input
{
color
:
$mine-shaft-gray
;
font-size
:
1
.5rem
;
outline
:
none
;
border
:
none
;
flex
:
1
1
auto
;
width
:
0
;
&
:
:
placeholder
{
color
:
$chalice-gray
;
}
}
&
__currency-select
{
@extend
%row-nowrap
;
align-items
:
center
;
font-size
:
1rem
;
color
:
$royal-blue
;
height
:
2
.5rem
;
padding
:
.5rem
1rem
;
border
:
1px
solid
$royal-blue
;
border-radius
:
2
.5rem
;
background-color
:
$zumthor-blue
;
outline
:
none
;
cursor
:
pointer
;
user-select
:
none
;
&
:active
{
background-color
:
rgba
(
$zumthor-blue
,
.8
);
}
}
&
__dropdown-icon
{
height
:
1rem
;
width
:
.75rem
;
margin-left
:
.4rem
;
background-image
:
url(../../assets/images/dropdown-blue.svg)
;
background-repeat
:
no-repeat
;
background-size
:
contain
;
background-position
:
50%
50%
;
}
}
src/components/CurrencyInputPanel/index.js
0 → 100644
View file @
5f6e7056
import
React
,
{
Component
}
from
'
react
'
;
import
{
connect
}
from
'
react-redux
'
;
import
PropTypes
from
'
prop-types
'
;
import
'
./currency-panel.scss
'
;
class
CurrencyInputPanel
extends
Component
{
render
()
{
return
(
<
div
className
=
"
currency-input-panel
"
>
<
div
><
/div
>
<
div
className
=
"
currency-input-panel__container
"
>
<
div
className
=
"
currency-input-panel__label-row
"
>
<
div
className
=
"
currency-input-panel__label-container
"
>
<
span
className
=
"
currency-input-panel__label
"
>
Input
<
/span
>
<
span
className
=
"
currency-input-panel__label-description
"
>
(
estimated
)
<
/span
>
<
/div
>
<
span
className
=
"
currency-input-panel__extra-text
"
>
Balance
:
0.03141
<
/span
>
<
/div
>
<
div
className
=
"
currency-input-panel__input-row
"
>
<
input
type
=
"
number
"
className
=
"
currency-input-panel__input
"
placeholder
=
"
0.0
"
/>
<
button
className
=
"
currency-input-panel__currency-select
"
>
Select
a
token
<
span
className
=
"
currency-input-panel__dropdown-icon
"
/>
<
/button
>
<
/div
>
<
/div
>
<
div
><
/div
>
<
/div
>
)
}
}
export
default
connect
()(
CurrencyInputPanel
);
src/components/NavigationTabs/index.js
View file @
5f6e7056
...
@@ -8,12 +8,14 @@ class NavigationTabs extends Component {
...
@@ -8,12 +8,14 @@ class NavigationTabs extends Component {
history
:
PropTypes
.
shape
({
history
:
PropTypes
.
shape
({
push
:
PropTypes
.
func
.
isRequired
,
push
:
PropTypes
.
func
.
isRequired
,
}),
}),
className
:
PropTypes
.
string
,
};
};
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
selectedPath
:
this
.
props
.
location
.
pathname
,
selectedPath
:
this
.
props
.
location
.
pathname
,
className
:
''
,
};
};
}
}
...
@@ -34,7 +36,7 @@ class NavigationTabs extends Component {
...
@@ -34,7 +36,7 @@ class NavigationTabs extends Component {
render
()
{
render
()
{
return
(
return
(
<
Tabs
>
<
Tabs
className
=
{
this
.
props
.
className
}
>
{
this
.
renderTab
(
'
Swap
'
,
'
/swap
'
)
}
{
this
.
renderTab
(
'
Swap
'
,
'
/swap
'
)
}
{
this
.
renderTab
(
'
Send
'
,
'
/send
'
)
}
{
this
.
renderTab
(
'
Send
'
,
'
/send
'
)
}
{
this
.
renderTab
(
'
Pool
'
,
'
/pool
'
)
}
{
this
.
renderTab
(
'
Pool
'
,
'
/pool
'
)
}
...
...
src/components/Tab/index.js
View file @
5f6e7056
...
@@ -6,7 +6,7 @@ import './tab.scss';
...
@@ -6,7 +6,7 @@ import './tab.scss';
export
const
Tabs
=
props
=>
{
export
const
Tabs
=
props
=>
{
return
(
return
(
<
div
className
=
"
tabs
"
>
<
div
className
=
{
classnames
(
"
tabs
"
,
props
.
className
)}
>
{
props
.
children
}
{
props
.
children
}
<
/div
>
<
/div
>
);
);
...
...
src/components/Tab/tab.scss
View file @
5f6e7056
...
@@ -7,6 +7,14 @@
...
@@ -7,6 +7,14 @@
background-color
:
$concrete-gray
;
background-color
:
$concrete-gray
;
border-radius
:
3rem
;
border-radius
:
3rem
;
border
:
1px
solid
$mercury-gray
;
border
:
1px
solid
$mercury-gray
;
.tab
:first-child
{
margin-left
:
-1px
;
}
.tab
:last-child
{
margin-right
:
-1px
;
}
}
}
.tab
{
.tab
{
...
@@ -17,9 +25,8 @@
...
@@ -17,9 +25,8 @@
flex
:
1
0
auto
;
flex
:
1
0
auto
;
border-radius
:
3rem
;
border-radius
:
3rem
;
border
:
1px
solid
transparent
;
border
:
1px
solid
transparent
;
transition
:
250ms
ease-in-out
;
transition
:
300ms
ease-in-out
;
left
:
-1px
;
cursor
:
pointer
;
position
:
relative
;
span
{
span
{
color
:
$dove-gray
;
color
:
$dove-gray
;
...
...
src/pages/Swap/index.js
View file @
5f6e7056
...
@@ -4,6 +4,7 @@ import { withRouter } from 'react-router-dom';
...
@@ -4,6 +4,7 @@ import { withRouter } from 'react-router-dom';
import
PropTypes
from
'
prop-types
'
;
import
PropTypes
from
'
prop-types
'
;
import
Header
from
'
../../components/Header
'
;
import
Header
from
'
../../components/Header
'
;
import
NavigationTabs
from
'
../../components/NavigationTabs
'
;
import
NavigationTabs
from
'
../../components/NavigationTabs
'
;
import
CurrencyInputPanel
from
'
../../components/CurrencyInputPanel
'
;
import
"
./swap.scss
"
;
import
"
./swap.scss
"
;
...
@@ -18,8 +19,9 @@ class Swap extends Component {
...
@@ -18,8 +19,9 @@ class Swap extends Component {
return
(
return
(
<
div
className
=
"
swap
"
>
<
div
className
=
"
swap
"
>
<
Header
/>
<
Header
/>
<
NavigationTabs
className
=
"
swap__navigation
"
/>
<
div
className
=
"
swap__content
"
>
<
div
className
=
"
swap__content
"
>
<
NavigationTabs
/>
<
CurrencyInputPanel
/>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
);
);
...
...
src/pages/Swap/swap.scss
View file @
5f6e7056
.swap
{
.swap
{
&
__content
{
&
__content
{
padding
:
1rem
.75rem
;
padding
:
1rem
.75rem
;
margin-top
:
1rem
;
}
&
__navigation
{
margin
:
0
.75rem
;
}
}
}
}
\ No newline at end of file
src/variables.scss
View file @
5f6e7056
...
@@ -3,11 +3,14 @@ $black: #000;
...
@@ -3,11 +3,14 @@ $black: #000;
// Gray
// Gray
$concrete-gray
:
#FBFBFB
;
$concrete-gray
:
#FBFBFB
;
$silver-gray
:
#C4C4C4
;
$mercury-gray
:
#E1E1E1
;
$mercury-gray
:
#E1E1E1
;
$silver-gray
:
#C4C4C4
;
$chalice-gray
:
#AEAEAE
;
$dove-gray
:
#737373
;
$dove-gray
:
#737373
;
$mine-shaft-gray
:
#2B2B2B
;
// Blue
// Blue
$zumthor-blue
:
#EBF4FF
;
$royal-blue
:
#2F80ED
;
$royal-blue
:
#2F80ED
;
// Purple
// Purple
...
...
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