-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
panel-header.js
35 lines (29 loc) · 987 Bytes
/
panel-header.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// SPDX-License-Identifier: MIT
// Copyright contributors to the kepler.gl project
import {PanelHeaderFactory, Icons, withState} from '@kepler.gl/components';
import {toggleModal} from '@kepler.gl/actions';
import React from 'react';
import {IntlProvider} from 'react-intl';
const KEPLER_DOC = 'https://docs.kepler.gl/docs/keplergl-jupyter';
export function CustomPanelHeaderFactory() {
const PanelHeader = PanelHeaderFactory();
const actionItems = props => [
{
id: 'docs',
iconComponent: Icons.Docs,
href: KEPLER_DOC,
blank: true,
tooltip: 'tooltip.documentation',
onClick: () => {}
}
];
const JupyterPanelHeader = props => (
<IntlProvider locale="en" messages={{'tooltip.documentation': 'Documentation'}}>
<PanelHeader {...props} actionItems={actionItems(props)} />
</IntlProvider>
);
return withState([], state => state, {
toggleModal
})(JupyterPanelHeader);
}
export default CustomPanelHeaderFactory;