Mailspring/internal_packages/message-list/lib/thread-archive-button.cjsx
Evan Morikawa b89fea38c0 feat(labels): add a new label/folder picker
Summary:
This is the initial diff for the label picker UI. This is all of the
functionality and none of the CSS.

Test Plan: todo

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: sdw

Differential Revision: https://phab.nylas.com/D1761
2015-07-21 14:20:15 -07:00

23 lines
625 B
CoffeeScript

_ = require 'underscore'
React = require 'react'
{Actions, DOMUtils} = require 'nylas-exports'
{RetinaImg} = require 'nylas-component-kit'
class ThreadArchiveButton extends React.Component
@displayName: "ThreadArchiveButton"
render: =>
<button className="btn btn-toolbar btn-archive"
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