mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-12 04:25:31 +08:00
9fa64c38e2
- Fixes styling for snooze quick action button when thread selected - Fixes snooze popover input debouncing - Other interaction fixes
42 lines
1.1 KiB
JavaScript
42 lines
1.1 KiB
JavaScript
/** @babel */
|
|
import React, {Component, PropTypes} from 'react';
|
|
import {Actions} from 'nylas-exports';
|
|
import {Popover} from 'nylas-component-kit';
|
|
import SnoozePopoverBody from './snooze-popover-body';
|
|
|
|
|
|
class SnoozePopover extends Component {
|
|
static displayName = 'SnoozePopover';
|
|
|
|
static propTypes = {
|
|
threads: PropTypes.array.isRequired,
|
|
buttonComponent: PropTypes.object.isRequired,
|
|
direction: PropTypes.string,
|
|
pointerStyle: PropTypes.object,
|
|
popoverStyle: PropTypes.object,
|
|
};
|
|
|
|
closePopover = ()=> {
|
|
this.refs.popover.close();
|
|
};
|
|
|
|
render() {
|
|
const {buttonComponent, direction, popoverStyle, pointerStyle, threads} = this.props
|
|
|
|
return (
|
|
<Popover
|
|
ref="popover"
|
|
className="snooze-popover"
|
|
direction={direction || 'down-align-left'}
|
|
buttonComponent={buttonComponent}
|
|
popoverStyle={popoverStyle}
|
|
pointerStyle={pointerStyle}
|
|
onOpened={()=> Actions.closePopover()}>
|
|
<SnoozePopoverBody threads={threads} isFixedPopover={false} closePopover={this.closePopover}/>
|
|
</Popover>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
export default SnoozePopover;
|