mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fixing tooltips to use single component (#3194)
* Removing MaterialTooltip references Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Removing MaterialTooltip component Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Removing entity icon hover effect in catalog and settings Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Align share and close tooltip positions Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Fixing EnityIcon selector Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Reverting back selector changes Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Removing explicit interactive prop Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Removing interactive prop from catalog icons Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
1 parent
18587168dc
commit
1f2692c18f
12 files changed
+62
-97
No files matched your search
@@ -24,15 +24,17 @@ import { welcomeURL } from "../../../common/routes";
|
||||
import { navigate } from "../../navigation";
|
||||
import { Icon } from "../icon";
|
||||
import { TopBar } from "../layout/topbar";
|
||||
import { MaterialTooltip } from "../material-tooltip/material-tooltip";
|
||||
|
||||
export function CatalogTopbar() {
|
||||
return (
|
||||
<TopBar label="Catalog">
|
||||
<div>
|
||||
<MaterialTooltip title="Close Catalog" placement="left">
|
||||
<Icon style={{ cursor: "default" }} material="close" onClick={() => navigate(welcomeURL())}/>
|
||||
</MaterialTooltip>
|
||||
<Icon
|
||||
style={{ cursor: "default" }}
|
||||
material="close"
|
||||
onClick={() => navigate(welcomeURL())}
|
||||
tooltip="Close Catalog"
|
||||
/>
|
||||
</div>
|
||||
</TopBar>
|
||||
);
|
||||
|
||||
@@ -18,19 +18,20 @@
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import { observer } from "mobx-react";
|
||||
import React from "react";
|
||||
import type { RouteComponentProps } from "react-router";
|
||||
|
||||
import { previousActiveTab } from "../+catalog";
|
||||
import { ClusterStore } from "../../../common/cluster-store";
|
||||
import { catalogURL } from "../../../common/routes";
|
||||
import { navigate } from "../../navigation";
|
||||
import { Icon } from "../icon";
|
||||
import { TopBar } from "../layout/topbar";
|
||||
import { MaterialTooltip } from "../material-tooltip/material-tooltip";
|
||||
import type { Cluster } from "../../../main/cluster";
|
||||
import { ClusterStore } from "../../../common/cluster-store";
|
||||
|
||||
import type { RouteComponentProps } from "react-router";
|
||||
import type { ClusterViewRouteParams } from "../../../common/routes";
|
||||
import { previousActiveTab } from "../+catalog";
|
||||
import type { Cluster } from "../../../main/cluster";
|
||||
import { TooltipPosition } from "../tooltip";
|
||||
|
||||
interface Props extends RouteComponentProps<ClusterViewRouteParams> {
|
||||
}
|
||||
@@ -43,11 +44,17 @@ export const ClusterTopbar = observer((props: Props) => {
|
||||
return (
|
||||
<TopBar label={getCluster()?.name}>
|
||||
<div>
|
||||
<MaterialTooltip title="Back to Catalog" placement="left">
|
||||
<Icon style={{ cursor: "default" }} material="close" onClick={() => {
|
||||
<Icon
|
||||
style={{ cursor: "default" }}
|
||||
material="close"
|
||||
onClick={() => {
|
||||
navigate(`${catalogURL()}/${previousActiveTab.get()}`);
|
||||
}}/>
|
||||
</MaterialTooltip>
|
||||
}}
|
||||
tooltip={{
|
||||
preferredPositions: TooltipPosition.BOTTOM_RIGHT,
|
||||
children: "Back to Catalog"
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</TopBar>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user