1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-15 02:36:36 +00:00

add: style sheet for NoteItemSimple component

This commit is contained in:
sota1235
2016-12-29 17:07:42 +09:00
parent ecb91b3155
commit aba6c2eb4f
2 changed files with 73 additions and 5 deletions

View File

@@ -3,7 +3,7 @@
*/
import React, { PropTypes } from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './NoteItem.styl'
import styles from './NoteItemSimple.styl'
/**
* @description Note item component when using simple display mode.
@@ -14,17 +14,17 @@ import styles from './NoteItem.styl'
*/
const NoteItemSimple = ({ isActive, note, handleNoteClick, handleNoteContextMenu }) => (
<div styleName={isActive
? 'item--active'
: 'item'
? 'item-simple--active'
: 'item-simple'
}
key={`${note.storage}-${note.key}`}
onClick={e => handleNoteClick(e, `${note.storage}-${note.key}`)}
onContextMenu={e => handleNoteContextMenu(e, `${note.storage}-${note.key}`)}
>
<div styleName='item-title'>
<div styleName='item-simple-title'>
{note.title.trim().length > 0
? note.title
: <span styleName='item-title-empty'>Empty</span>
: <span styleName='item-simple-title-empty'>Empty</span>
}
</div>
</div>