Fix home action strip horizontal padding on mobile.

Move horizontal padding from the scroll container into layout slots so the action strip can bleed edge-to-edge while summary and search keep consistent inset; add drawer bottom spacer and h-auto height.
This commit is contained in:
Francisco Ignácio Fontoura Solla 2026-08-02 01:08:01 -03:00
parent 40afd80254
commit 5952c1e51a
3 changed files with 10 additions and 6 deletions

View file

@ -59,7 +59,7 @@ export const CampaignHomeLayout = ({
>
<div className="flex h-full min-h-0 flex-col">
{summarySlot ? (
<div className="min-w-0" data-slot="home-summary">
<div className="min-w-0 mx-4" data-slot="home-summary">
{summarySlot}
</div>
) : null}
@ -75,7 +75,7 @@ export const CampaignHomeLayout = ({
>
<div
data-slot="home-actions"
className="min-w-0 -mx-4 w-[calc(100%+2rem)] md:mx-0 md:w-auto"
className="min-w-0 -mx-4 w-[calc(100%+2rem)] md:mx-0 md:w-auto px-4"
>
{actions}
</div>
@ -83,7 +83,10 @@ export const CampaignHomeLayout = ({
{searchSlot ? (
<div
data-slot="home-search"
className={cn('order-2 min-w-0 md:order-1', focused ? 'mt-0' : 'mt-4 md:mt-0 md:mb-6')}
className={cn(
'order-2 min-w-0 md:order-1 mx-4',
focused ? 'mt-0' : 'mt-4 md:mt-0 md:mb-6',
)}
>
{searchSlot}
</div>

View file

@ -122,8 +122,8 @@ export const CampaignQuickActionsDrawer = ({
<DrawerContent
id="CampaignQuickActionsDrawer"
className={cn(
'border-t border-border bg-background text-foreground shadow-[0_-4px_24px_-8px_rgb(0_0_0/0.12)] print:hidden',
isFull && 'z-[60] h-dvh max-h-dvh [--drawer-height:100dvh]',
'border-t border-border bg-background text-foreground shadow-[0_-4px_24px_-8px_rgb(0_0_0/0.12)] print:hidden h-auto',
isFull && 'z-60 h-dvh max-h-dvh [--drawer-height:100dvh]',
)}
>
<DrawerTitle className="sr-only">Ações rápidas</DrawerTitle>
@ -168,6 +168,7 @@ export const CampaignQuickActionsDrawer = ({
compactStack
/>
</HomeSearchExcludeProvider>
<div className="h-2" />
</div>
</DrawerContent>
</Drawer>

View file

@ -92,7 +92,7 @@ export const CampaignContentScroll = ({
data-home-compact-bottom-padding={compactHomeBottomPadding || undefined}
className={cn(
'min-h-0 flex-1 overflow-y-auto overscroll-contain md:p-6 print:h-auto print:overflow-visible print:p-0',
compactHomeBottomPadding ? 'px-4 pt-4 pb-2' : 'p-4',
compactHomeBottomPadding ? 'pt-4 pb-2' : 'p-4',
)}
>
{children}