mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
* Side Public License, v 1.
|
|
*/
|
|
|
|
import { SharePluginStart, SharePluginSetup } from '@kbn/share-plugin/public';
|
|
import { Plugin, CoreSetup, CoreStart } from '@kbn/core/public';
|
|
|
|
interface SetupDeps {
|
|
share: SharePluginSetup;
|
|
}
|
|
|
|
interface StartDeps {
|
|
share: SharePluginStart;
|
|
}
|
|
|
|
export class ShareDemoPlugin implements Plugin<void, void, SetupDeps, StartDeps> {
|
|
public setup(core: CoreSetup<StartDeps>, { share }: SetupDeps) {
|
|
share.register({
|
|
id: 'demo',
|
|
getShareMenuItems: (context) => [
|
|
{
|
|
panel: {
|
|
id: 'demo',
|
|
title: 'Panel title',
|
|
content: 'Panel content',
|
|
},
|
|
shareMenuItem: {
|
|
name: 'Demo list item (from share_example plugin)',
|
|
},
|
|
},
|
|
],
|
|
});
|
|
}
|
|
|
|
public start(core: CoreStart, { share }: StartDeps) {}
|
|
|
|
public stop() {}
|
|
}
|