mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
TabLayout should not be part of LensRuntimeRendererEnv (#1029)
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
2b6f283e1b
commit
c78b071da3
7 files changed
+40
-38
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { Button, DynamicPageType, Icon, IconProps, LensExtension, React } from "@lens/extensions";
|
||||
import { Button, Icon, IconProps, LensExtension, React, DynamicPageType } from "@lens/extensions";
|
||||
import { CoffeeDoodle } from "react-open-doodles";
|
||||
import path from "path";
|
||||
|
||||
@@ -8,7 +8,7 @@ export default class ExampleExtension extends LensExtension {
|
||||
this.registerPage({
|
||||
type: DynamicPageType.CLUSTER,
|
||||
path: "/extension-example",
|
||||
menuTitle: "Example Extension",
|
||||
title: "Example Extension",
|
||||
components: {
|
||||
Page: () => <ExtensionPage extension={this}/>,
|
||||
MenuIcon: ExtensionIcon,
|
||||
@@ -33,19 +33,16 @@ export class ExtensionPage extends React.Component<{ extension: ExampleExtension
|
||||
}
|
||||
|
||||
render() {
|
||||
const { TabLayout } = this.props.extension.runtime.components;
|
||||
const doodleStyle = {
|
||||
width: "200px"
|
||||
}
|
||||
return (
|
||||
<TabLayout className="ExampleExtension">
|
||||
<div className="flex column gaps align-flex-start">
|
||||
<div style={doodleStyle}><CoffeeDoodle accent="#3d90ce" /></div>
|
||||
<p>Hello from Example extension!</p>
|
||||
<p>File: <i>{__filename}</i></p>
|
||||
<Button accent label="Deactivate" onClick={this.deactivate}/>
|
||||
</div>
|
||||
</TabLayout>
|
||||
<div className="ExampleExtension flex column gaps align-flex-start">
|
||||
<div style={doodleStyle}><CoffeeDoodle accent="#3d90ce"/></div>
|
||||
<p>Hello from Example extension!</p>
|
||||
<p>File: <i>{__filename}</i></p>
|
||||
<Button accent label="Deactivate" onClick={this.deactivate}/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user