Mailspring/internal_packages/account-sidebar/lib/account-sidebar-item.cjsx

19 lines
506 B
Text
Raw Normal View History

React = require 'react'
{Actions} = require("nylas-exports")
class AccountSidebarItem extends React.Component
@displayName: "AccountSidebarItem"
render: =>
className = "item " + if @props.select then " selected" else ""
<div className={className} onClick={@_onClick} id={@props.item.id}>
<span className="name"> {@props.item.displayName}</span>
</div>
_onClick: (event) =>
event.preventDefault()
Actions.selectView(@props.item.view)
module.exports = AccountSidebarItem