From 3144d8b94e6731fc145e1d222489f352639f40fd Mon Sep 17 00:00:00 2001 From: RitaDias Date: Tue, 4 Feb 2025 15:10:25 +0100 Subject: [PATCH] fix(core): fix padding issue on global dropdown (#8495) --- .../core/perspective/navbar/ReleasesList.tsx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/packages/sanity/src/core/perspective/navbar/ReleasesList.tsx b/packages/sanity/src/core/perspective/navbar/ReleasesList.tsx index 60dfd5d6d37..175aa111333 100644 --- a/packages/sanity/src/core/perspective/navbar/ReleasesList.tsx +++ b/packages/sanity/src/core/perspective/navbar/ReleasesList.tsx @@ -26,15 +26,19 @@ const StyledBox = styled(Box)` max-height: 75vh; ` -const StyledPublishedBox = styled(Box)<{$removePadding: boolean}>( - ({$removePadding}) => css` +const StyledPublishedBox = styled(Box)<{$reducePadding: boolean; $removePadding?: boolean}>(({ + $reducePadding, + $removePadding, +}) => { + const padding = $reducePadding ? '4px' : '16px' + return css` position: sticky; top: 0; background-color: var(--card-bg-color); z-index: 10; - padding-bottom: ${$removePadding ? '4px' : '16px'}; - `, -) + padding-bottom: ${$removePadding ? '0px' : padding}; + ` +}) export function ReleasesList({ areReleasesEnabled, @@ -117,7 +121,10 @@ export function ReleasesList({ return ( - +