Mailspring/internal_packages/main-calendar/lib/quick-event-button.jsx
Halla Moore a366f3be9b feat(calendar): Add functionality to create/edit events
Summary:
Add some basic functionality for creating and editing calendar events

This is a weird work-around diff. Original review is at
https://phab.nylas.com/D3396

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D3426
2016-11-14 12:21:29 -08:00

28 lines
638 B
JavaScript

import React from 'react';
import ReactDOM from 'react-dom';
import {Actions} from 'nylas-exports';
import QuickEventPopover from './quick-event-popover';
export default class QuickEventButton extends React.Component {
onClick = (event) => {
event.stopPropagation()
const buttonRect = ReactDOM.findDOMNode(this).getBoundingClientRect()
Actions.openPopover(
<QuickEventPopover />,
{originRect: buttonRect, direction: 'down'}
)
};
render() {
return (
<button
tabIndex={-1}
className="btn btn-toolbar"
onClick={this.onClick}
>
+
</button>
);
}
}