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:
parent
bdc21cc4e2
commit
3912b443d0
@ -68,7 +68,8 @@ const StyledContainer = styled('div', {
|
|||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const StyledSearch = styled('div')(({ theme }) => ({
|
const StyledSearch = styled('div')<{ isOpen?: boolean }>(
|
||||||
|
({ theme, isOpen }) => ({
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
backgroundColor: theme.palette.background.paper,
|
backgroundColor: theme.palette.background.paper,
|
||||||
@ -77,7 +78,17 @@ const StyledSearch = styled('div')(({ theme }) => ({
|
|||||||
padding: '3px 5px 3px 12px',
|
padding: '3px 5px 3px 12px',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
zIndex: 3,
|
zIndex: 3,
|
||||||
}));
|
...(isOpen
|
||||||
|
? {
|
||||||
|
borderBottomLeftRadius: 0,
|
||||||
|
borderBottomRightRadius: 0,
|
||||||
|
borderBottom: '0px',
|
||||||
|
paddingTop: theme.spacing(0.5),
|
||||||
|
paddingBottom: theme.spacing(0.5),
|
||||||
|
}
|
||||||
|
: {}),
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
const StyledInputBase = styled(InputBase)(({ theme }) => ({
|
const StyledInputBase = styled(InputBase)(({ theme }) => ({
|
||||||
width: '100%',
|
width: '100%',
|
||||||
@ -302,22 +313,7 @@ export const CommandBar = () => {
|
|||||||
return (
|
return (
|
||||||
<StyledContainer ref={searchContainerRef} active={showSuggestions}>
|
<StyledContainer ref={searchContainerRef} active={showSuggestions}>
|
||||||
<RecentlyVisitedRecorder />
|
<RecentlyVisitedRecorder />
|
||||||
<StyledSearch
|
<StyledSearch isOpen={showSuggestions}>
|
||||||
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
|
<SearchIcon
|
||||||
sx={{
|
sx={{
|
||||||
mr: 1,
|
mr: 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user