2018-07-11 09:42:43 +00:00
|
|
|
// @flow
|
|
|
|
|
2017-10-23 12:18:12 +00:00
|
|
|
import { AtlasKitThemeProvider } from '@atlaskit/theme';
|
|
|
|
import React from 'react';
|
|
|
|
|
2018-09-03 13:53:24 +00:00
|
|
|
import { DialogContainer } from '../../base/dialog';
|
2020-01-29 12:30:17 +00:00
|
|
|
import { ChromeExtensionBanner } from '../../chrome-extension-banner';
|
2017-03-07 03:43:41 +00:00
|
|
|
|
2017-07-21 21:12:02 +00:00
|
|
|
import { AbstractApp } from './AbstractApp';
|
|
|
|
|
2020-06-04 14:09:13 +00:00
|
|
|
// Register middlewares and reducers.
|
|
|
|
import '../middlewares';
|
|
|
|
import '../reducers';
|
|
|
|
|
2016-11-23 21:46:46 +00:00
|
|
|
/**
|
2018-07-12 16:16:57 +00:00
|
|
|
* Root app {@code Component} on Web/React.
|
2016-11-23 21:46:46 +00:00
|
|
|
*
|
|
|
|
* @extends AbstractApp
|
|
|
|
*/
|
|
|
|
export class App extends AbstractApp {
|
2017-10-23 12:18:12 +00:00
|
|
|
/**
|
|
|
|
* Overrides the parent method to inject {@link AtlasKitThemeProvider} as
|
|
|
|
* the top most component.
|
|
|
|
*
|
|
|
|
* @override
|
|
|
|
*/
|
2018-07-11 09:42:43 +00:00
|
|
|
_createMainElement(component, props) {
|
2017-10-23 12:18:12 +00:00
|
|
|
return (
|
|
|
|
<AtlasKitThemeProvider mode = 'dark'>
|
2020-01-29 12:30:17 +00:00
|
|
|
<ChromeExtensionBanner />
|
2018-07-11 09:42:43 +00:00
|
|
|
{ super._createMainElement(component, props) }
|
2017-10-23 12:18:12 +00:00
|
|
|
</AtlasKitThemeProvider>
|
|
|
|
);
|
|
|
|
}
|
2018-09-03 13:53:24 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Renders the platform specific dialog container.
|
|
|
|
*
|
|
|
|
* @returns {React$Element}
|
|
|
|
*/
|
|
|
|
_renderDialogContainer() {
|
|
|
|
return (
|
|
|
|
<AtlasKitThemeProvider mode = 'dark'>
|
|
|
|
<DialogContainer />
|
|
|
|
</AtlasKitThemeProvider>
|
|
|
|
);
|
|
|
|
}
|
2016-11-23 21:46:46 +00:00
|
|
|
}
|