Skip to content

Commit

Permalink
chore: fix searchbar styling when focus is on results (#7517)
Browse files Browse the repository at this point in the history
  • Loading branch information
daveleek authored Jul 2, 2024
1 parent f42e74e commit 0a2f7e5
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions frontend/src/component/commandBar/CommandBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@ const StyledSearch = styled('div')(({ theme }) => ({
padding: '3px 5px 3px 12px',
width: '100%',
zIndex: 3,
'&:focus-within': {
borderBottomLeftRadius: 0,
borderBottomRightRadius: 0,
borderBottom: '0px',
},
}));

const StyledInputBase = styled(InputBase)(({ theme }) => ({
Expand Down Expand Up @@ -214,7 +209,22 @@ export const CommandBar = () => {
return (
<StyledContainer ref={searchContainerRef} active={showSuggestions}>
<RecentlyVisitedRecorder />
<StyledSearch>
<StyledSearch
sx={{
borderBottomLeftRadius: (theme) =>
showSuggestions
? 0
: theme.shape.borderRadiusExtraLarge,
borderBottomRightRadius: (theme) =>
showSuggestions
? 0
: theme.shape.borderRadiusExtraLarge,
borderBottom: (theme) =>
showSuggestions
? '0px'
: `1px solid ${theme.palette.neutral.border}`,
}}
>
<SearchIcon
sx={{
mr: 1,
Expand Down

0 comments on commit 0a2f7e5

Please sign in to comment.