From 5c03dd4775845c559a1f6298f7577609ba907bb1 Mon Sep 17 00:00:00 2001
From: Nate Sesti <sestinj@gmail.com>
Date: Wed, 5 Jul 2023 23:49:37 -0700
Subject: ui overhaul

---
 .../src/components/HeaderButtonWithText.tsx        | 44 ++++++++++++----------
 1 file changed, 24 insertions(+), 20 deletions(-)

(limited to 'extension/react-app/src/components/HeaderButtonWithText.tsx')

diff --git a/extension/react-app/src/components/HeaderButtonWithText.tsx b/extension/react-app/src/components/HeaderButtonWithText.tsx
index 72a653c5..de8e3c98 100644
--- a/extension/react-app/src/components/HeaderButtonWithText.tsx
+++ b/extension/react-app/src/components/HeaderButtonWithText.tsx
@@ -1,6 +1,7 @@
 import React, { useState } from "react";
-
-import { HeaderButton } from ".";
+import { Tooltip } from "react-tooltip";
+import styled from "styled-components";
+import { HeaderButton, StyledTooltip, defaultBorderRadius } from ".";
 
 interface HeaderButtonWithTextProps {
   text: string;
@@ -13,25 +14,28 @@ interface HeaderButtonWithTextProps {
 
 const HeaderButtonWithText = (props: HeaderButtonWithTextProps) => {
   const [hover, setHover] = useState(false);
-  const paddingLeft = (props.disabled ? (props.active ?  "3px" : "1px"): (hover ? "4px" : "1px"));
   return (
-    <HeaderButton
-      inverted={props.inverted}
-      disabled={props.disabled}
-      style={{ padding: (props.active ?  "3px" : "1px"), paddingLeft, borderRadius: (props.active ?  "50%" : undefined) }}
-      onMouseEnter={() => {
-        if (!props.disabled) {
-          setHover(true);
-        }
-      }}
-      onMouseLeave={() => {
-        setHover(false);
-      }}
-      onClick={props.onClick}
-    >
-      <span hidden={!hover}>{props.text}</span>
-      {props.children}
-    </HeaderButton>
+    <>
+      <HeaderButton
+        data-tooltip-id={`header_button_${props.text}`}
+        inverted={props.inverted}
+        disabled={props.disabled}
+        onMouseEnter={() => {
+          if (!props.disabled) {
+            setHover(true);
+          }
+        }}
+        onMouseLeave={() => {
+          setHover(false);
+        }}
+        onClick={props.onClick}
+      >
+        {props.children}
+      </HeaderButton>
+      <StyledTooltip id={`header_button_${props.text}`} place="bottom">
+        {props.text}
+      </StyledTooltip>
+    </>
   );
 };
 
-- 
cgit v1.2.3-70-g09d2

