Mailspring/internal_packages/message-list/lib/thread-archive-button.cjsx
2015-07-23 12:22:27 -07:00

24 lines
685 B
CoffeeScript

_ = require 'underscore'
React = require 'react'
{Actions, DOMUtils} = require 'nylas-exports'
{RetinaImg} = require 'nylas-component-kit'
class ThreadArchiveButton extends React.Component
@displayName: "ThreadArchiveButton"
@containerRequired: false
render: =>
<button className="btn btn-toolbar btn-archive"
style={order: -105}
data-tooltip="Archive"
onClick={@_onArchive}>
<RetinaImg name="toolbar-archive.png" mode={RetinaImg.Mode.ContentIsMask}/>
</button>
_onArchive: (e) =>
return unless DOMUtils.nodeIsVisible(e.currentTarget)
Actions.archive()
e.stopPropagation()
module.exports = ThreadArchiveButton