From a0dc844bceaf6ba0b760bdc345509c654d720624 Mon Sep 17 00:00:00 2001 From: Michael Taranto Date: Tue, 10 Sep 2024 09:42:09 +1000 Subject: [PATCH] Fix wide alignY --- .../src/lib/utils/collapsibleAlignmentProps.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/braid-design-system/src/lib/utils/collapsibleAlignmentProps.ts b/packages/braid-design-system/src/lib/utils/collapsibleAlignmentProps.ts index 16d1f3bdf25..04d15394a4d 100644 --- a/packages/braid-design-system/src/lib/utils/collapsibleAlignmentProps.ts +++ b/packages/braid-design-system/src/lib/utils/collapsibleAlignmentProps.ts @@ -76,7 +76,7 @@ export function resolveCollapsibleAlignmentProps({ mobile: alignMobile = 'flexStart', tablet: alignTablet = alignMobile, desktop: alignDesktop = alignTablet, - wide: alignWide = alignTablet, + wide: alignWide = alignDesktop, } = normalizedAlign; // COLLAPSED HORIZONTAL ALIGNMENT @@ -84,7 +84,7 @@ export function resolveCollapsibleAlignmentProps({ collapseMobile && alignMobile === 'flexStart' ? 'stretch' : alignMobile, collapseTablet && alignTablet === 'flexStart' ? 'stretch' : alignTablet, collapseDesktop && alignDesktop === 'flexStart' ? 'stretch' : alignDesktop, - alignYWide, + // wide doesnt collapse, no check needed here ] as const; return { @@ -96,7 +96,7 @@ export function resolveCollapsibleAlignmentProps({ flexDirection: optimizeResponsiveArray(flexDirection), justifyContent: align ? optimizeResponsiveArray([ - alignMobile, + alignMobile, // mobile doesnt reverse, no check needed here reverse ? invertAlignment(alignTablet) : alignTablet, reverse ? invertAlignment(alignDesktop) : alignDesktop, reverse ? invertAlignment(alignWide) : alignWide, @@ -107,7 +107,7 @@ export function resolveCollapsibleAlignmentProps({ collapseMobile ? collapsedAlignItems[0] : alignYMobile, collapseTablet ? collapsedAlignItems[1] : alignYTablet, collapseDesktop ? collapsedAlignItems[2] : alignYDesktop, - collapsedAlignItems[3], + alignYWide, // wide doesnt collapse, no check needed here ]) : nonCollapsedAlignItems, },