Mailspring/packages/nylas-mail/internal_packages/notifications/lib/items/dev-mode-notif.jsx
2017-02-16 13:15:10 -08:00

28 lines
610 B
JavaScript

import {React} from 'nylas-exports';
import {Notification} from 'nylas-component-kit';
export default class DevModeNotification extends React.Component {
static displayName = 'DevModeNotification';
constructor() {
super();
// Don't need listeners to update this, since toggling dev mode reloads
// the entire window anyway
this.state = {
inDevMode: NylasEnv.inDevMode(),
}
}
render() {
if (!this.state.inDevMode) {
return <span />
}
return (
<Notification
priority="0"
title="Nylas Mail is running in dev mode!"
/>
)
}
}