-
+
{currentWorkspace.name}
, TooltipDecoratorPr
href?: string; // render icon as hyperlink
size?: string | number; // icon-size
small?: boolean; // pre-defined icon-size
+ smallest?: boolean; // pre-defined icon-size
big?: boolean; // pre-defined icon-size
active?: boolean; // apply active-state styles
interactive?: boolean; // indicates that icon is interactive and highlight it on focus/hover
@@ -63,7 +64,7 @@ export class Icon extends React.PureComponent {
const { isInteractive } = this;
const {
// skip passing props to icon's html element
- className, href, link, material, svg, size, small, big,
+ className, href, link, material, svg, size, smallest, small, big,
disabled, sticker, active, focusable, children,
interactive: _interactive,
onClick: _onClick,
@@ -75,7 +76,7 @@ export class Icon extends React.PureComponent {
const iconProps: Partial = {
className: cssNames("Icon", className,
{ svg, material, interactive: isInteractive, disabled, sticker, active, focusable },
- !size ? { small, big } : {}
+ !size ? { smallest, small, big } : {}
),
onClick: isInteractive ? this.onClick : undefined,
onKeyDown: isInteractive ? this.onKeyDown : undefined,
diff --git a/src/renderer/lens-app.tsx b/src/renderer/lens-app.tsx
index e6c2baa6c2..5c1b27b13a 100644
--- a/src/renderer/lens-app.tsx
+++ b/src/renderer/lens-app.tsx
@@ -1,5 +1,6 @@
import "../common/system-ca"
import React from "react";
+import { ipcRenderer } from "electron";
import { Route, Router, Switch } from "react-router";
import { observer } from "mobx-react";
import { userStore } from "../common/user-store";
@@ -17,6 +18,12 @@ import { extensionLoader } from "../extensions/extension-loader";
export class LensApp extends React.Component {
static async init() {
extensionLoader.loadOnClusterManagerRenderer();
+ window.addEventListener("offline", () => {
+ ipcRenderer.send("network:offline")
+ })
+ window.addEventListener("online", () => {
+ ipcRenderer.send("network:online")
+ })
}
render() {