2016-02-19 02:00:11 +08:00
|
|
|
/** @babel */
|
|
|
|
import React, {Component, PropTypes} from 'react';
|
|
|
|
import {Popover} from 'nylas-component-kit';
|
2016-02-23 07:48:07 +08:00
|
|
|
import SnoozePopoverBody from './snooze-popover-body';
|
2016-02-19 02:00:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
class SnoozePopover extends Component {
|
|
|
|
static displayName = 'SnoozePopover';
|
|
|
|
|
|
|
|
static propTypes = {
|
|
|
|
threads: PropTypes.array.isRequired,
|
|
|
|
buttonComponent: PropTypes.object.isRequired,
|
2016-02-23 07:48:07 +08:00
|
|
|
direction: PropTypes.string,
|
|
|
|
pointerStyle: PropTypes.object,
|
|
|
|
popoverStyle: PropTypes.object,
|
2016-02-19 02:00:11 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
render() {
|
2016-02-23 07:48:07 +08:00
|
|
|
const {buttonComponent, direction, popoverStyle, pointerStyle, threads} = this.props
|
2016-02-19 02:00:11 +08:00
|
|
|
|
|
|
|
return (
|
|
|
|
<Popover
|
|
|
|
className="snooze-popover"
|
2016-02-23 07:48:07 +08:00
|
|
|
direction={direction || 'down-align-left'}
|
|
|
|
buttonComponent={buttonComponent}
|
|
|
|
popoverStyle={popoverStyle}
|
|
|
|
pointerStyle={pointerStyle}>
|
|
|
|
<SnoozePopoverBody threads={threads}/>
|
2016-02-19 02:00:11 +08:00
|
|
|
</Popover>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
export default SnoozePopover;
|