From f566fc1042bc0b49651771dabf584cf4a38ea2d4 Mon Sep 17 00:00:00 2001 From: Chintan Mehta Date: Wed, 15 Nov 2023 11:19:49 +0000 Subject: [PATCH] search button alignment --- .../components/GlobalSearch/GlobalSearch.jsx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/ui/src/components/GlobalSearch/GlobalSearch.jsx b/packages/ui/src/components/GlobalSearch/GlobalSearch.jsx index cea58fbb3..ec5c645a1 100644 --- a/packages/ui/src/components/GlobalSearch/GlobalSearch.jsx +++ b/packages/ui/src/components/GlobalSearch/GlobalSearch.jsx @@ -14,19 +14,18 @@ const SearchButton = styled("button")(({ theme, isHomePage = false }) => ({ color: isHomePage ? theme.palette.primary.dark : "white", borderRadius: theme.spacing(0.6), border: `1px solid ${theme.palette.primary.main}`, - padding: `${theme.spacing(0.4)} ${theme.spacing(1.2)}`, + padding: theme.spacing(0.4), })); function GlobalSearch({ isHomePage }) { const { setOpen } = useContext(SearchContext); - const shortcutText = - navigator?.platform.indexOf("Mac") > -1 ? "⌘ K" : "Ctrl+K"; + const shortcutText = navigator?.platform.indexOf("Mac") > -1 ? "⌘ K" : "Ctrl+K"; const searchButtonContainer = { width: 1, display: "flex", justifyContent: "center", ...(isHomePage && { - margin: (theme) => `${theme.spacing(2)} 0 ${theme.spacing(3)}`, + margin: theme => `${theme.spacing(2)} 0 ${theme.spacing(3)}`, }), }; @@ -59,22 +58,23 @@ function GlobalSearch({ isHomePage }) { sx={{ display: "flex", justifyContent: "space-between", - fontSize: (theme) => theme.spacing(2), + typography: "subtitle1", alignItems: "center", + lineHeight: "normal", }} > - + theme.spacing(1) }}> Search... theme.spacing(1.3), + typography: "caption", fontWeight: "bold", color: "white", - backgroundColor: (theme) => theme.palette.primary.main, - padding: (theme) => `${theme.spacing(0.5)} ${theme.spacing(1)}`, - borderRadius: (theme) => theme.spacing(0.4), + backgroundColor: theme => theme.palette.primary.main, + padding: theme => `${theme.spacing(0.1)} ${theme.spacing(1)}`, + borderRadius: theme => theme.spacing(0.4), }} > {shortcutText} @@ -82,7 +82,7 @@ function GlobalSearch({ isHomePage }) { - + ); }