Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Use react-tooltip component for homescreen tooltip #5131

Merged
merged 1 commit into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"react-router": "5.1.2",
"react-router-dom": "5.1.2",
"react-syntax-highlighter": "11.0.2",
"react-tooltip": "4.5.1",
"react-virtualized": "^9.21.0",
"redux": "4.0.4",
"redux-logger": "^2.7.4",
Expand Down
16 changes: 7 additions & 9 deletions src/renderer/screens/startup/HomeScreen.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { Component } from "react";
import { Scrollbars } from "react-custom-scrollbars";
import Warning from "../../../renderer/icons/warning.svg";
import * as pkg from "../../../../package.json";

import OnlyIf from "../../../renderer/components/only-if/OnlyIf";
Expand All @@ -24,6 +23,8 @@ import ChainIcon from "../../icons/chain.svg";
import MenuIcon from "../../icons/list.svg";
import TrashIcon from "../../icons/trash-icon.svg";
import SettingsIcon from "../../icons/settings.svg";
import WarningIcon from "../../../renderer/icons/warning.svg";
import ReactTooltip from "react-tooltip";

class HomeScreen extends Component {
constructor(props) {
Expand Down Expand Up @@ -141,14 +142,10 @@ class HomeScreen extends Component {
<span>
{workspaceInfo.name} ({workspaceInfo.flavor})
<OnlyIf test={workspaceInfo.isLegacy}>
<span className="popover-container">
<span className="popover">
This workspace was created with an old version of Ganache.
<br />
Create a new workspace to take advantage of Ganache v7.
</span>
<Warning />
</span>
<WarningIcon data-tip="This workspace was created with an old version of Ganache.
<br />
Create a new workspace to take advantage of Ganache v7."
data-multiline={true}/>
</OnlyIf>
</span>
<div
Expand Down Expand Up @@ -269,6 +266,7 @@ class HomeScreen extends Component {
>
<UpdateModal />
</OnlyIf>
<ReactTooltip />
</React.Fragment>
);
}
Expand Down