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"> <div className="flex h-full min-h-0 flex-col">
{summarySlot ? ( {summarySlot ? (
<div className="min-w-0" data-slot="home-summary"> <div className="min-w-0 mx-4" data-slot="home-summary">
{summarySlot} {summarySlot}
</div> </div>
) : null} ) : null}
@ -75,7 +75,7 @@ export const CampaignHomeLayout = ({
> >
<div <div
data-slot="home-actions" 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} {actions}
</div> </div>
@ -83,7 +83,10 @@ export const CampaignHomeLayout = ({
{searchSlot ? ( {searchSlot ? (
<div <div
data-slot="home-search" 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} {searchSlot}
</div> </div>

View file

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

View file

@ -92,7 +92,7 @@ export const CampaignContentScroll = ({
data-home-compact-bottom-padding={compactHomeBottomPadding || undefined} data-home-compact-bottom-padding={compactHomeBottomPadding || undefined}
className={cn( className={cn(
'min-h-0 flex-1 overflow-y-auto overscroll-contain md:p-6 print:h-auto print:overflow-visible print:p-0', '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} {children}