Mailspring/internal_packages/thread-list/lib/draft-buttons.cjsx
EthanBlackburn a54bdc94fd Delete button now appears when drafts are selected
Summary: Fixes T2230 Support for deleting multiple drafts in the local drafts view

Test Plan: tested manually

Reviewers: bengotow, evan

Reviewed By: evan

Subscribers: gleb

Maniphest Tasks: T2230

Differential Revision: https://phab.nylas.com/D1714
2015-07-09 13:28:02 -07:00

25 lines
736 B
CoffeeScript

React = require "react/addons"
classNames = require 'classnames'
DraftListStore = require './draft-list-store'
{RetinaImg} = require 'nylas-component-kit'
{Actions, FocusedContentStore} = require "nylas-exports"
class DraftDeleteButton extends React.Component
@displayName: 'DraftDeleteButton'
@containerRequired: false
@propTypes:
selection: React.PropTypes.object.isRequired
render: ->
<button style={order:-100}
className="btn btn-toolbar"
data-tooltip="Delete"
onClick={@_destroyDraft}>
<RetinaImg name="icon-composer-trash.png" mode={RetinaImg.Mode.ContentIsMask} />
</button>
_destroyDraft: =>
Actions.deleteSelection()
module.exports = {DraftDeleteButton}