From d547ebf4558ab20202e5efd12cda6ffdbc28dfc8 Mon Sep 17 00:00:00 2001
From: Chris Beer <chris@cbeer.info>
Date: Mon, 11 Dec 2023 13:32:16 -0800
Subject: [PATCH] Create a new button variant for our 'button but look like
 regular text' style

---
 src/components/SearchHit.js   |  1 -
 src/components/SearchPanel.js | 12 ++----------
 src/config/settings.js        | 14 ++++++++++++++
 3 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/src/components/SearchHit.js b/src/components/SearchHit.js
index f21147df8..f2db8a965 100644
--- a/src/components/SearchHit.js
+++ b/src/components/SearchHit.js
@@ -114,7 +114,6 @@ export class SearchHit extends Component {
               }),
             },
             paddingRight: 1,
-
           }}
           divider
           button={!selected}
diff --git a/src/components/SearchPanel.js b/src/components/SearchPanel.js
index 368d7fafa..42550dddf 100644
--- a/src/components/SearchPanel.js
+++ b/src/components/SearchPanel.js
@@ -64,17 +64,9 @@ export class SearchPanel extends Component {
         />
         {
           fetchSearch && suggestedSearches && query === '' && suggestedSearches.map(search => (
-            <Typography component="p" key={search} variant="body1">
+            <Typography component="p" key={search} variant="body1" sx={{ margin: 2 }}>
               <Button
-                sx={{
-                  '& span': {
-                    lineHeight: '1.5em',
-                  },
-                  margin: 2,
-                  padding: 0,
-                  textAlign: 'inherit',
-                  textTransform: 'none',
-                }}
+                variant="inlineText"
                 color="secondary"
                 onClick={() => fetchSearch(`${searchService.id}?q=${search}`, search)}
               >
diff --git a/src/config/settings.js b/src/config/settings.js
index 1f9cf3eb5..90db80b1f 100644
--- a/src/config/settings.js
+++ b/src/config/settings.js
@@ -324,6 +324,20 @@ export default {
           },
         ],
       },
+      MuiButton: {
+        styleOverrides: {
+          inlineText: {
+            lineHeight: '1.5em',
+            padding: 0,
+            textAlign: 'inherit',
+            textTransform: 'none',
+
+          },
+          inlineTextSecondary: ({ theme }) => ({
+            color: theme.palette.secondary.main,
+          }),
+        }
+      },
       MuiButtonBase: {
         defaultProps: {
           disableTouchRipple: true,
-- 
GitLab