mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 18:32:20 +08:00
a54bdc94fd
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
25 lines
736 B
CoffeeScript
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}
|