Mailspring/internal_packages/theme-picker/lib/theme-picker-store.jsx
2016-03-10 15:18:57 -08:00

30 lines
578 B
JavaScript

import React from 'react';
import Actions from '../../../src/flux/actions';
import NylasStore from 'nylas-store';
import ThemePicker from './theme-picker';
class ThemePickerStore extends NylasStore {
constructor() {
super();
}
activate = ()=> {
this.disposable = NylasEnv.commands.add("body", "window:launch-theme-picker", () => {
Actions.openModal({
component: (<ThemePicker />),
height: 390,
width: 250,
});
});
}
deactivate = ()=> {
this.disposable.dispose();
}
}
export default new ThemePickerStore();