2015-02-28 07:34:37 +08:00
|
|
|
React = require 'react'
|
2015-05-15 08:08:30 +08:00
|
|
|
{Actions} = require("nylas-exports")
|
2015-02-28 07:34:37 +08:00
|
|
|
|
2015-05-01 04:08:29 +08:00
|
|
|
class AccountSidebarItem extends React.Component
|
|
|
|
@displayName: "AccountSidebarItem"
|
|
|
|
|
|
|
|
render: =>
|
2015-02-28 07:34:37 +08:00
|
|
|
className = "item " + if @props.select then " selected" else ""
|
|
|
|
<div className={className} onClick={@_onClick} id={@props.item.id}>
|
2015-09-01 01:47:25 +08:00
|
|
|
<div className="name">{@props.item.displayName}</div>
|
2015-02-28 07:34:37 +08:00
|
|
|
</div>
|
|
|
|
|
2015-05-01 04:08:29 +08:00
|
|
|
_onClick: (event) =>
|
2015-02-28 07:34:37 +08:00
|
|
|
event.preventDefault()
|
|
|
|
Actions.selectView(@props.item.view)
|
2015-05-01 04:08:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
module.exports = AccountSidebarItem
|