File tree 3 files changed +27
-22
lines changed
packages/next/src/client/components/react-dev-overlay/_experimental/internal/components
3 files changed +27
-22
lines changed Original file line number Diff line number Diff line change @@ -56,8 +56,8 @@ const styles = css`
56
56
}
57
57
58
58
/* Account for the footer height, when present */
59
- [data-nextjs-dialog-body ] : has ( ~ [data-nextjs-dialog-footer ]) {
60
- margin-bottom : calc ( var (--next-dialog-footer-height ) + 2 px );
59
+ [data-nextjs-dialog ][ data- has-footer = 'true' ] [data-nextjs-dialog-body ] {
60
+ margin-bottom : var (--next-dialog-footer-height );
61
61
}
62
62
63
63
[data-nextjs-dialog-content ] > [data-nextjs-dialog-header ] {
@@ -71,16 +71,21 @@ const styles = css`
71
71
}
72
72
73
73
[data-nextjs-dialog-footer ] {
74
- width : 100% ;
75
- /* We make this element absolute to fix it to the bottom during the height transition */
76
- position : absolute;
77
- bottom : 0 ;
74
+ /* Subtract border width */
75
+ width : calc (100% - 2px );
76
+ /*
77
+ We make this element fixed to anchor it to the bottom during the height transition.
78
+ If you make this relative it will jump during the transition and not collapse or expand smoothly.
79
+ If you make this absolute it will remain stuck at its initial position when scrolling the dialog.
80
+ */
81
+ position : fixed;
82
+ bottom : 1px ;
78
83
min-height : var (--next-dialog-footer-height );
79
84
border-radius : 0 0 var (--next-dialog-radius ) var (--next-dialog-radius );
80
85
overflow : hidden;
81
86
82
87
> * {
83
- height : 100 % ;
88
+ min- height: var ( --next-dialog-footer-height ) ;
84
89
}
85
90
}
86
91
Original file line number Diff line number Diff line change @@ -127,7 +127,6 @@ function ChevronUpDown() {
127
127
128
128
export const CALL_STACK_STYLES = css `
129
129
.error-overlay-call-stack-container {
130
- border-top : 1px solid var (--color-gray-400 );
131
130
position : relative;
132
131
}
133
132
Original file line number Diff line number Diff line change @@ -80,13 +80,16 @@ export function ErrorOverlayLayout({
80
80
} as React . CSSProperties ,
81
81
}
82
82
83
+ const hasFooter = Boolean ( footerMessage || errorCode )
84
+
83
85
return (
84
86
< ErrorOverlayOverlay fixed = { isBuildError } { ...animationProps } >
85
87
< div data-nextjs-dialog-root { ...animationProps } >
86
88
< ErrorOverlayDialog
87
89
onClose = { onClose }
88
90
isTurbopack = { isTurbopack }
89
91
dialogResizerRef = { dialogResizerRef }
92
+ data-has-footer = { hasFooter }
90
93
>
91
94
< DialogContent >
92
95
< ErrorOverlayFloatingHeader
@@ -110,21 +113,19 @@ export function ErrorOverlayLayout({
110
113
</ ErrorOverlayDialogHeader >
111
114
112
115
< ErrorOverlayDialogBody > { children } </ ErrorOverlayDialogBody >
113
-
114
- { ( footerMessage || errorCode ) && (
115
- < DialogFooter >
116
- < ErrorOverlayFooter
117
- footerMessage = { footerMessage }
118
- errorCode = { errorCode }
119
- />
120
- </ DialogFooter >
121
- ) }
122
-
123
- < ErrorOverlayBottomStack
124
- count = { readyErrors ?. length ?? 0 }
125
- activeIdx = { activeIdx ?? 0 }
126
- />
127
116
</ DialogContent >
117
+ { hasFooter && (
118
+ < DialogFooter >
119
+ < ErrorOverlayFooter
120
+ footerMessage = { footerMessage }
121
+ errorCode = { errorCode }
122
+ />
123
+ </ DialogFooter >
124
+ ) }
125
+ < ErrorOverlayBottomStack
126
+ count = { readyErrors ?. length ?? 0 }
127
+ activeIdx = { activeIdx ?? 0 }
128
+ />
128
129
</ ErrorOverlayDialog >
129
130
</ div >
130
131
</ ErrorOverlayOverlay >
You can’t perform that action at this time.
0 commit comments