mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-30 18:53:10 +00:00
B122 — format
This commit is contained in:
parent
74c9c3a6e5
commit
b50e799796
3 changed files with 4 additions and 20 deletions
|
|
@ -31,10 +31,7 @@ export type CampaignHomeActionButtonProps = {
|
||||||
const actionControlBaseClassName =
|
const actionControlBaseClassName =
|
||||||
'group box-content flex min-h-11 flex-col items-center gap-2 rounded-md text-center outline-none focus-visible:ring-2 focus-visible:ring-ring active:opacity-90 disabled:pointer-events-none disabled:opacity-50'
|
'group box-content flex min-h-11 flex-col items-center gap-2 rounded-md text-center outline-none focus-visible:ring-2 focus-visible:ring-ring active:opacity-90 disabled:pointer-events-none disabled:opacity-50'
|
||||||
|
|
||||||
const actionStripControlClassName = cn(
|
const actionStripControlClassName = cn(actionControlBaseClassName, 'w-[5.5rem] shrink-0 snap-start')
|
||||||
actionControlBaseClassName,
|
|
||||||
'w-[5.5rem] shrink-0 snap-start',
|
|
||||||
)
|
|
||||||
|
|
||||||
const actionResponsiveControlClassName = cn(
|
const actionResponsiveControlClassName = cn(
|
||||||
actionControlBaseClassName,
|
actionControlBaseClassName,
|
||||||
|
|
|
||||||
|
|
@ -15,14 +15,11 @@ const HomeChromeRetractionShell = ({
|
||||||
slot,
|
slot,
|
||||||
className,
|
className,
|
||||||
children,
|
children,
|
||||||
allowHorizontalBleed = false,
|
|
||||||
}: {
|
}: {
|
||||||
retracted: boolean
|
retracted: boolean
|
||||||
slot?: string
|
slot?: string
|
||||||
className?: string
|
className?: string
|
||||||
children: ReactNode
|
children: ReactNode
|
||||||
/** B111 — keep Y clip for grid-rows retraction without clipping -mx bleed on X. */
|
|
||||||
allowHorizontalBleed?: boolean
|
|
||||||
}) => (
|
}) => (
|
||||||
<div
|
<div
|
||||||
data-slot={slot}
|
data-slot={slot}
|
||||||
|
|
@ -30,12 +27,7 @@ const HomeChromeRetractionShell = ({
|
||||||
className={cn(homeChromeRetractionClass(retracted), className)}
|
className={cn(homeChromeRetractionClass(retracted), className)}
|
||||||
aria-hidden={retracted || undefined}
|
aria-hidden={retracted || undefined}
|
||||||
>
|
>
|
||||||
<div
|
<div className="min-h-0 overflow-hidden">{children}</div>
|
||||||
className={cn('min-h-0', allowHorizontalBleed ? 'overflow-y-hidden' : 'overflow-hidden')}
|
|
||||||
data-allow-horizontal-bleed={allowHorizontalBleed || undefined}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -72,10 +64,7 @@ export const CampaignHomeLayout = ({
|
||||||
slot="home-actions-chrome"
|
slot="home-actions-chrome"
|
||||||
className="order-1 md:order-2"
|
className="order-1 md:order-2"
|
||||||
>
|
>
|
||||||
<div
|
<div data-slot="home-actions" className="min-w-0 md:mx-0 md:w-auto">
|
||||||
data-slot="home-actions"
|
|
||||||
className="min-w-0 md:mx-0 md:w-auto"
|
|
||||||
>
|
|
||||||
{actions}
|
{actions}
|
||||||
</div>
|
</div>
|
||||||
</HomeChromeRetractionShell>
|
</HomeChromeRetractionShell>
|
||||||
|
|
|
||||||
|
|
@ -216,9 +216,7 @@ describe('CampaignHomeActionStrip', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('scrolls horizontally on pointer-fine drag past the threshold', () => {
|
it('scrolls horizontally on pointer-fine drag past the threshold', () => {
|
||||||
const { container } = render(
|
const { container } = render(<CampaignHomeActionStrip variant="strip" actions={manyActions} />)
|
||||||
<CampaignHomeActionStrip variant="strip" actions={manyActions} />,
|
|
||||||
)
|
|
||||||
const scroller = getScroller(container)
|
const scroller = getScroller(container)
|
||||||
mockScrollerOverflow(scroller)
|
mockScrollerOverflow(scroller)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue