Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
fether
Commits
047c80b1
Commit
047c80b1
authored
Jan 23, 2019
by
Luke Schoen
Browse files
feat: Dynamic account list
parent
7616e99b
Changes
2
Hide whitespace changes
Inline
Side-by-side
packages/fether-react/src/Accounts/AccountsList/AccountsList.js
View file @
047c80b1
...
...
@@ -60,9 +60,10 @@ class AccountsList extends Component {
<
div
className
=
'
window_content
'
>
<
div
className
=
'
box -scroller
'
>
{
accountsListLength
?
(
<
ul
className
=
'
list
'
>
<
section
className
=
'
cards
'
>
{
accountsList
.
map
(
address
=>
(
<
li
<
div
className
=
'
card
'
key
=
{
address
}
data
-
address
=
{
address
}
// Using data- to avoid creating a new item Component
onClick
=
{
this
.
handleClick
}
...
...
@@ -75,9 +76,9 @@ class AccountsList extends Component {
screen
=
'
accounts
'
shortAddress
/>
<
/
li
>
<
/
div
>
))}
<
/
ul
>
<
/
section
>
)
:
(
<
p
className
=
'
create-hint
'
>
Nothing
here
yet
!
...
...
packages/fether-react/src/assets/sass/shared/_list.scss
View file @
047c80b1
.list
{
padding
:
0
.5rem
;
&
>
li
{
margin-bottom
:
0
.5rem
;
&
:last-child
{
margin-bottom
:
0
;
}
}
.cards
{
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
space-between
;
}
.card
{
flex-basis
:
calc
(
50%
-
0em
);
/* width */
flex-grow
:
0
;
flex-shrink
:
1
;
padding
:
0
.5rem
;
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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