Mailspring/internal_packages/mode-switch/lib/main.es6
Ben Gotow 7533c7ae81 feat(tutorial): Overlay bubbles that guide you through initial features
Summary:
Add header to show how many trial days remain

More rendering out of Store, consolidate registry and store and expose via new serviceRegistry

WIP

Merge branch 'master' into hallamoore/feature-walkthrough-tutorial

Switch to using observable instead of AbortablePromise

Update submodule

WIP

WIP

Remove annotations

Remove changes

WIP

Test Plan: No tests

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3260
2016-09-13 02:29:38 -04:00

35 lines
1.1 KiB
JavaScript

import {ComponentRegistry, WorkspaceStore} from 'nylas-exports';
import {HasTutorialTip} from 'nylas-component-kit';
import ModeToggle from './mode-toggle';
const ToggleWithTutorialTip = HasTutorialTip(ModeToggle, {
title: 'Compose with Context',
instructions: "N1 shows you everything about your contacts right inside your inbox. See LinkedIn profiles, Twitter bios, message history, and more.",
});
// NOTE: this is a hack to allow ComponentRegistry
// to register the same component multiple times in
// different areas. if we do this more than once, let's
// dry this out.
class ToggleWithTutorialTipList extends ToggleWithTutorialTip {
static displayName = 'ModeToggleList'
}
export function activate() {
ComponentRegistry.register(ToggleWithTutorialTipList, {
location: WorkspaceStore.Sheet.Thread.Toolbar.Right,
modes: ['list'],
});
ComponentRegistry.register(ToggleWithTutorialTip, {
location: WorkspaceStore.Sheet.Threads.Toolbar.Right,
modes: ['split'],
});
}
export function deactivate() {
ComponentRegistry.unregister(ToggleWithTutorialTip);
ComponentRegistry.unregister(ToggleWithTutorialTipList);
}