Add tooltip to header external link

This commit is contained in:
Anthony Laibe 2018-10-26 16:40:34 +02:00
parent 87dfffef4d
commit ed9a910f4a
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>
); );
} }