From 243884e6a318e8d338c12398fedf5778fb0ba84d Mon Sep 17 00:00:00 2001 From: Clemens Solar Date: Tue, 30 Jan 2024 18:40:35 +0100 Subject: [PATCH] feat: add tooltips to sidebar and console --- src/components/Workspace/Console.tsx | 24 ++++++++++++++++-------- src/components/Workspace/Sidebar.tsx | 26 ++++++++++++++------------ 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/components/Workspace/Console.tsx b/src/components/Workspace/Console.tsx index 8e9e2d4..4c4caf5 100644 --- a/src/components/Workspace/Console.tsx +++ b/src/components/Workspace/Console.tsx @@ -1,5 +1,7 @@ import DeleteIcon from '@mui/icons-material/Delete'; -import { Box, IconButton } from '@mui/material'; +import Box from '@mui/material/Box'; +import IconButton from '@mui/material/IconButton'; +import Tooltip from '@mui/material/Tooltip'; import React, { useEffect } from 'react'; import { useOpenSCADProvider } from '../OpenscadWorkerProvider'; @@ -15,14 +17,20 @@ export default function Console() { }, [log]); return ( - - +
+ + + + + +
+
-        
-      
-      
         {log?.join('\n')}
         
       
diff --git a/src/components/Workspace/Sidebar.tsx b/src/components/Workspace/Sidebar.tsx index 33c66f3..6a4af79 100644 --- a/src/components/Workspace/Sidebar.tsx +++ b/src/components/Workspace/Sidebar.tsx @@ -5,6 +5,7 @@ import LibraryBooksIcon from '@mui/icons-material/LibraryBooks'; import TuneIcon from '@mui/icons-material/Tune'; import IconButton from '@mui/material/IconButton'; import Stack from '@mui/material/Stack'; +import Tooltip from '@mui/material/Tooltip'; import React from 'react'; import { EditorMode } from '../Workspace'; @@ -40,18 +41,19 @@ export default function Sidebar({ onChange, mode }: Props) { spacing={1} > {buttons.map((button) => ( - - {button.icon} - + + + {button.icon} + + ))} );