simplify extension's registrations apis

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2020-10-27 16:18:03 +02:00
1 parent d872e073e3
commit 85087e5cc1
11 files changed
+108 -173

No files matched your search

+9 -19
View File
@@ -3,24 +3,14 @@ import { ExampleIcon, ExamplePage } from "./page"
import React from "react"
export default class ExampleExtension extends LensRendererExtension {
onActivate() {
console.log('EXAMPLE EXTENSION RENDERER: ACTIVATED', this.getMeta());
}
registerClusterPage() {
return [
{
path: "/extension-example",
title: "Example Extension",
components: {
Page: () => <ExamplePage extension={this} />,
MenuIcon: ExampleIcon,
}
clusterPages = [
{
path: "/extension-example",
title: "Example Extension",
components: {
Page: () => <ExamplePage extension={this}/>,
MenuIcon: ExampleIcon,
}
]
}
onDeactivate() {
console.log('EXAMPLE EXTENSION RENDERER: DEACTIVATED', this.getMeta());
}
}
]
}