Skip to content

Commit 856979b

Browse files
committed
modify: add border line on NoteList component
1 parent 4792548 commit 856979b

2 files changed

Lines changed: 27 additions & 18 deletions

File tree

browser/main/NoteList/NoteItem.js

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,27 +51,29 @@ const NoteItem = ({ isActive, note, dateDisplay, handleNoteClick, handleNoteCont
5151
onClick={e => handleNoteClick(e, `${note.storage}-${note.key}`)}
5252
onContextMenu={e => handleNoteContextMenu(e, `${note.storage}-${note.key}`)}
5353
>
54-
<div styleName='item-bottom-time'>{dateDisplay}</div>
54+
<div styleName='item-wrapper'>
55+
<div styleName='item-bottom-time'>{dateDisplay}</div>
5556

56-
<div styleName='item-title'>
57-
{note.title.trim().length > 0
58-
? note.title
59-
: <span styleName='item-title-empty'>Empty</span>
60-
}
61-
</div>
62-
63-
<div styleName='item-bottom'>
64-
<div styleName='item-bottom-tagList'>
65-
{note.tags.length > 0
66-
? TagElementList(note.tags)
67-
: ''
57+
<div styleName='item-title'>
58+
{note.title.trim().length > 0
59+
? note.title
60+
: <span styleName='item-title-empty'>Empty</span>
6861
}
6962
</div>
70-
</div>
7163

72-
{note.isStarred ?
73-
<i styleName='item-star' className='fa fa-star' /> : ''
74-
}
64+
<div styleName='item-bottom'>
65+
<div styleName='item-bottom-tagList'>
66+
{note.tags.length > 0
67+
? TagElementList(note.tags)
68+
: ''
69+
}
70+
</div>
71+
</div>
72+
73+
{note.isStarred ?
74+
<i styleName='item-star' className='fa fa-star' /> : ''
75+
}
76+
</div>
7577
</div>
7678
)
7779

browser/main/NoteList/NoteItem.styl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ $control-height = 30px
77

88
.item
99
position relative
10-
padding 20px 25px
10+
padding 0 25px
1111
user-select none
1212
cursor pointer
1313
background-color $ui-noteList-backgroundColor
@@ -26,6 +26,10 @@ $control-height = 30px
2626
background-color transparent
2727
color white
2828

29+
.item-wrapper
30+
padding 20px 0
31+
border-bottom $ui-border
32+
2933
.item--active
3034
@extend .item
3135
background-color $ui-active-color
@@ -115,6 +119,9 @@ body[data-theme="dark"]
115119
&:hover
116120
background-color alpha($ui-active-color, 20%)
117121

122+
.item-wrapper
123+
border-color $ui-dark-borderColor
124+
118125
.item--active
119126
@extend .item
120127
border-color $ui-dark-borderColor

0 commit comments

Comments
 (0)