1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 10:16:26 +00:00

modify: add icon for NoteItemSimple component

This commit is contained in:
sota1235
2016-12-29 19:08:29 +09:00
parent cc3bd41df2
commit c1df311e86
2 changed files with 17 additions and 0 deletions

View File

@@ -22,6 +22,10 @@ const NoteItemSimple = ({ isActive, note, handleNoteClick, handleNoteContextMenu
onContextMenu={e => handleNoteContextMenu(e, `${note.storage}-${note.key}`)}
>
<div styleName='item-simple-title'>
{note.type === 'SNIPPET_NOTE'
? <i styleName='item-simple-title-icon' className='fa fa-fw fa-code' />
: <i styleName='item-simple-title-icon' className='fa fa-fw fa-file-text-o' />
}
{note.title.trim().length > 0
? note.title
: <span styleName='item-simple-title-empty'>Empty</span>
@@ -35,6 +39,7 @@ NoteItemSimple.propTypes = {
note: PropTypes.shape({
storage: PropTypes.string.isRequired,
key: PropTypes.string.isRequired,
type: PropTypes.string.isRequired,
title: PropTypes.string.isrequired,
}),
handleNoteClick: PropTypes.func.isRequired,