2015-05-20 07:06:59 +08:00
|
|
|
_ = require 'underscore'
|
2015-05-14 03:01:41 +08:00
|
|
|
React = require 'react'
|
2015-05-15 08:08:30 +08:00
|
|
|
{Actions, Utils} = require 'nylas-exports'
|
|
|
|
{RetinaImg} = require 'nylas-component-kit'
|
2015-05-14 03:01:41 +08:00
|
|
|
|
|
|
|
class ArchiveButton extends React.Component
|
|
|
|
@displayName: "ArchiveButton"
|
|
|
|
|
|
|
|
render: =>
|
|
|
|
<button className="btn btn-toolbar btn-archive"
|
|
|
|
data-tooltip="Archive"
|
|
|
|
onClick={@_onArchive}>
|
|
|
|
<RetinaImg name="toolbar-archive.png" />
|
|
|
|
</button>
|
|
|
|
|
|
|
|
_onArchive: (e) =>
|
|
|
|
return unless Utils.nodeIsVisible(e.currentTarget)
|
|
|
|
Actions.archive()
|
|
|
|
e.stopPropagation()
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = ArchiveButton
|