Mailspring/internal_packages/N1-Scheduler/lib/calendar/proposed-time-event.jsx
Evan Morikawa 39c37e10b9 feat(calendar): add week view for quick scheduler
Summary: New Calendar

Test Plan: TODO

Reviewers: drew, juan, bengotow

Reviewed By: bengotow

Subscribers: jackie

Differential Revision: https://phab.nylas.com/D2767
2016-04-04 15:05:48 -07:00

32 lines
773 B
JavaScript

import React from 'react'
import SchedulerActions from '../scheduler-actions'
import {CALENDAR_ID} from '../scheduler-constants'
/**
* Gets rendered in a CalendarEvent
*/
export default class ProposedTimeEvent extends React.Component {
static displayName = "ProposedTimeEvent";
static propTypes = {
event: React.PropTypes.object,
}
_onMouseDown(event) {
event.stopPropagation();
SchedulerActions.removeProposedTime(event.target.dataset)
}
render() {
if (this.props.event.calendarId === CALENDAR_ID) {
return (
<div className="rm-time"
data-end={this.props.event.end}
data-start={this.props.event.start}
onMouseDown={this._onMouseDown}
>&times;</div>
)
}
return false
}
}