From 9fa40d3d0819aaa27a055ebb51ebdccd83bf1dfd Mon Sep 17 00:00:00 2001 From: Sascha Date: Sun, 21 Mar 2021 13:46:49 +0100 Subject: Add tooltip to unimplemented navigations --- webui/src/components/Header/Header.tsx | 55 ++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/webui/src/components/Header/Header.tsx b/webui/src/components/Header/Header.tsx index 1fe7504f..dc649cb4 100644 --- a/webui/src/components/Header/Header.tsx +++ b/webui/src/components/Header/Header.tsx @@ -5,6 +5,7 @@ import AppBar from '@material-ui/core/AppBar'; import Tab from '@material-ui/core/Tab'; import Tabs from '@material-ui/core/Tabs'; import Toolbar from '@material-ui/core/Toolbar'; +import Tooltip from '@material-ui/core/Tooltip/Tooltip'; import { makeStyles } from '@material-ui/core/styles'; import { LightSwitch } from '../../components/Themer'; @@ -53,6 +54,12 @@ function NavTabs() { setValue(newValue); }; + const tooltipMsg = `This feature doesn't exist yet. Come help us build it.`; + + /*The span elements around disabled tabs are needed, as the tooltip + * won't be triggered by disabled elements. + * See: https://material-ui.com/components/tooltips/#disabled-elements + */ return ( - + + + + + - - + + + + + + + + + + ); } -- cgit