@@ -626,12 +626,16 @@ const StyledFooter = toggleStyledComponent(
626626 box-shadow: 0 -1px 0 ${ get ( 'colors.border.default' ) } ;
627627 padding: ${ get ( 'space.3' ) } ;
628628 display: flex;
629- flex-flow: wrap ;
630- justify-content: flex-end ;
629+ flex-direction: row-reverse ;
630+ flex-wrap: wrap-reverse ;
631631 gap: ${ get ( 'space.2' ) } ;
632632 z-index: 1;
633633 flex-shrink: 0;
634634
635+ @media (max-height: 256px) {
636+ flex-wrap: nowrap;
637+ overflow-x: scroll;
638+ }
635639 ${ sx } ;
636640 ` ,
637641)
@@ -658,20 +662,22 @@ const Buttons: React.FC<React.PropsWithChildren<{buttons: DialogButtonProps[]}>>
658662
659663 return (
660664 < >
661- { buttons . map ( ( dialogButtonProps , index ) => {
662- const { content, buttonType = 'default' , autoFocus = false , ...buttonProps } = dialogButtonProps
663- return (
664- < Button
665- key = { index }
666- { ...buttonProps }
667- // 'normal' value is equivalent to 'default', this is used for backwards compatibility
668- variant = { buttonType === 'normal' ? 'default' : buttonType }
669- ref = { autoFocus && autoFocusCount === 0 ? ( autoFocusCount ++ , autoFocusRef ) : null }
670- >
671- { content }
672- </ Button >
673- )
674- } ) }
665+ { buttons
666+ . map ( ( dialogButtonProps , index ) => {
667+ const { content, buttonType = 'default' , autoFocus = false , ...buttonProps } = dialogButtonProps
668+ return (
669+ < Button
670+ key = { index }
671+ { ...buttonProps }
672+ // 'normal' value is equivalent to 'default', this is used for backwards compatibility
673+ variant = { buttonType === 'normal' ? 'default' : buttonType }
674+ ref = { autoFocus && autoFocusCount === 0 ? ( autoFocusCount ++ , autoFocusRef ) : null }
675+ >
676+ { content }
677+ </ Button >
678+ )
679+ } )
680+ . reverse ( ) }
675681 </ >
676682 )
677683}
0 commit comments