Mailspring/internal_packages/thread-snooze/lib/components.jsx
Juan Tejada 76bda1dbe4 feat(snooze/send-later): Add snooze and send later plugins
Summary:
- Add initial version of snooze and send later plugins
- Tests are missing since this will probably heavily change before we are done with them

Test Plan: - TODO

Reviewers: drew, bengotow, evan

Reviewed By: bengotow, evan

Differential Revision: https://phab.nylas.com/D2578
2016-02-18 10:06:21 -08:00

57 lines
1.3 KiB
JavaScript

/** @babel */
import React, {Component, PropTypes} from 'react';
import {RetinaImg} from 'nylas-component-kit';
import SnoozePopover from './snooze-popover';
const toolbarButton = (
<button
className="btn btn-toolbar btn-snooze"
title="Snooze">
<RetinaImg
url="nylas://thread-snooze/assets/ic-toolbar-native-snooze@2x.png"
mode={RetinaImg.Mode.ContentIsMask} />
</button>
)
const quickActionButton = (
<div title="Snooze" className="btn action action-snooze" />
)
export class BulkThreadSnooze extends Component {
static displayName = 'BulkThreadSnooze';
static propTypes = {
selection: PropTypes.object,
items: PropTypes.array,
};
render() {
return <SnoozePopover buttonComponent={toolbarButton} threads={this.props.items} />;
}
}
export class ToolbarSnooze extends Component {
static displayName = 'ToolbarSnooze';
static propTypes = {
thread: PropTypes.object,
};
render() {
return <SnoozePopover buttonComponent={toolbarButton} threads={[this.props.thread]} />;
}
}
export class QuickActionSnooze extends Component {
static displayName = 'QuickActionSnooze';
static propTypes = {
thread: PropTypes.object,
};
render() {
return <SnoozePopover buttonComponent={quickActionButton} threads={[this.props.thread]} />;
}
}