mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-01 13:14:16 +08:00
fix(snooze): Fix quick action button, remove italic from popover
This commit is contained in:
parent
3790f15732
commit
d866679737
2 changed files with 7 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
import React, {Component, PropTypes} from 'react';
|
||||
import {PopoverStore, Actions} from 'nylas-exports';
|
||||
import {Actions} from 'nylas-exports';
|
||||
import SnoozePopoverBody from './snooze-popover-body';
|
||||
|
||||
|
||||
|
@ -12,12 +12,14 @@ class QuickActionSnoozeButton extends Component {
|
|||
|
||||
constructor() {
|
||||
super();
|
||||
this.openedPopover = false;
|
||||
}
|
||||
|
||||
onClick = (event)=> {
|
||||
event.stopPropagation()
|
||||
if (PopoverStore.isPopoverOpen()) {
|
||||
if (this.openedPopover) {
|
||||
Actions.closePopover();
|
||||
this.openedPopover = false;
|
||||
return;
|
||||
}
|
||||
const {thread} = this.props;
|
||||
|
@ -30,10 +32,11 @@ class QuickActionSnoozeButton extends Component {
|
|||
// The parent node is a bit too much to the left, lets adjust this.
|
||||
const rect = {height, width, top, bottom, right, left: left + 5}
|
||||
Actions.openPopover(
|
||||
<SnoozePopoverBody threads={[thread]}/>,
|
||||
<SnoozePopoverBody threads={[thread]} closePopover={Actions.closePopover}/>,
|
||||
rect,
|
||||
"left"
|
||||
)
|
||||
this.openedPopover = true;
|
||||
};
|
||||
|
||||
static containerRequired = false;
|
||||
|
|
|
@ -143,7 +143,7 @@ class SnoozePopoverBody extends Component {
|
|||
onMouseDown={this.onInputMouseDown}
|
||||
onKeyDown={this.onInputKeyDown}
|
||||
onChange={this.onInputChange}/>
|
||||
<em className="input-date-value">{formatted}</em>
|
||||
<span className="input-date-value">{formatted}</span>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue