1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-17 13:46:47 +02:00

fix: command bar search padding

This commit is contained in:
Tymoteusz Czech 2025-03-14 11:13:11 +01:00
parent bdc21cc4e2
commit 3912b443d0
No known key found for this signature in database
GPG Key ID: 133555230D88D75F

View File

@ -68,16 +68,27 @@ const StyledContainer = styled('div', {
},
}));
const StyledSearch = styled('div')(({ theme }) => ({
display: 'flex',
alignItems: 'center',
backgroundColor: theme.palette.background.paper,
border: `1px solid ${theme.palette.neutral.border}`,
borderRadius: theme.shape.borderRadiusExtraLarge,
padding: '3px 5px 3px 12px',
width: '100%',
zIndex: 3,
}));
const StyledSearch = styled('div')<{ isOpen?: boolean }>(
({ theme, isOpen }) => ({
display: 'flex',
alignItems: 'center',
backgroundColor: theme.palette.background.paper,
border: `1px solid ${theme.palette.neutral.border}`,
borderRadius: theme.shape.borderRadiusExtraLarge,
padding: '3px 5px 3px 12px',
width: '100%',
zIndex: 3,
...(isOpen
? {
borderBottomLeftRadius: 0,
borderBottomRightRadius: 0,
borderBottom: '0px',
paddingTop: theme.spacing(0.5),
paddingBottom: theme.spacing(0.5),
}
: {}),
}),
);
const StyledInputBase = styled(InputBase)(({ theme }) => ({
width: '100%',
@ -302,22 +313,7 @@ export const CommandBar = () => {
return (
<StyledContainer ref={searchContainerRef} active={showSuggestions}>
<RecentlyVisitedRecorder />
<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}`,
}}
>
<StyledSearch isOpen={showSuggestions}>
<SearchIcon
sx={{
mr: 1,