Merge pull request #168 from status-im/feature/add-tooltip-to-header-link

Add tooltip to header external link
This commit is contained in:
Iuri Matias 2018-10-26 16:57:02 +02:00 committed by GitHub
commit 908db2d923
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 28 additions and 4 deletions

View File

@ -2,10 +2,21 @@ import React from 'react';
import {Link, withRouter} from 'react-router-dom'; import {Link, withRouter} from 'react-router-dom';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {DropdownItem, DropdownMenu, DropdownToggle, Nav, NavItem, NavLink, Container, Alert} from 'reactstrap'; import {
UncontrolledTooltip,
DropdownItem,
DropdownMenu,
DropdownToggle,
Nav,
NavItem,
NavLink,
Container,
Alert
} from 'reactstrap';
import {explorerSearch} from "../actions"; import {explorerSearch} from "../actions";
import {LIGHT_THEME, DARK_THEME} from '../constants'; import {LIGHT_THEME, DARK_THEME} from '../constants';
import FontAwesome from 'react-fontawesome'; import FontAwesome from 'react-fontawesome';
import { } from 'reactstrap';
import "./Layout.css"; import "./Layout.css";
@ -178,17 +189,30 @@ class Layout extends React.Component {
return ( return (
<React.Fragment> <React.Fragment>
<NavItem> <NavItem>
<NavLink href="https://embark.status.im" title="Documentation" rel="noopener noreferrer" target="_blank"> <NavLink id="open-documentation"
href="https://embark.status.im"
title="Documentation"
rel="noopener noreferrer"
target="_blank">
<FontAwesome name="book" /> <FontAwesome name="book" />
</NavLink> </NavLink>
</NavItem> </NavItem>
<NavItem> <NavItem>
<NavLink href="https://github.com/embark-framework" title="Github" rel="noopener noreferrer" target="_blank"> <NavLink id="open-github"
href="https://github.com/embark-framework"
title="Github"
rel="noopener noreferrer"
target="_blank">
<FontAwesome name="github" /> <FontAwesome name="github" />
</NavLink> </NavLink>
</NavItem> </NavItem>
<UncontrolledTooltip target="open-documentation">
Open Embark documentation
</UncontrolledTooltip>
<UncontrolledTooltip target="open-github">
Open Github of Embark
</UncontrolledTooltip>
</React.Fragment> </React.Fragment>
); );
} }