Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import type { ErrorMessageType } from '../error-message/error-message'
import type { ErrorType } from '../error-type-label/error-type-label'

import { DialogContent, DialogFooter } from '../../Dialog'
import { Overlay } from '../../Overlay'
import {
ErrorOverlayToolbar,
styles as toolbarStyles,
Expand Down Expand Up @@ -33,6 +32,7 @@ import {
} from '../dialog/header'
import { ErrorOverlayDialogBody, DIALOG_BODY_STYLES } from '../dialog/body'
import { CALL_STACK_STYLES } from '../call-stack/call-stack'
import { OVERLAY_STYLES, ErrorOverlayOverlay } from '../overlay/overlay'

type ErrorOverlayLayoutProps = {
errorMessage: ErrorMessageType
Expand Down Expand Up @@ -69,7 +69,7 @@ export function ErrorOverlayLayout({
isTurbopack,
}: ErrorOverlayLayoutProps) {
return (
<Overlay fixed={isBuildError}>
<ErrorOverlayOverlay fixed={isBuildError}>
<ErrorOverlayDialog onClose={onClose} isTurbopack={isTurbopack}>
<DialogContent>
<ErrorOverlayFloatingHeader
Expand Down Expand Up @@ -107,11 +107,12 @@ export function ErrorOverlayLayout({
</DialogFooter>
</DialogContent>
</ErrorOverlayDialog>
</Overlay>
</ErrorOverlayOverlay>
)
}

export const styles = css`
${OVERLAY_STYLES}
${DIALOG_STYLES}
${DIALOG_HEADER_STYLES}
${DIALOG_BODY_STYLES}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { noop as css } from '../../../helpers/noop-template'
import { Overlay, type OverlayProps } from '../../Overlay/Overlay'

export function ErrorOverlayOverlay({ children, ...props }: OverlayProps) {
return <Overlay {...props}>{children}</Overlay>
}

export const OVERLAY_STYLES = css`
[data-nextjs-dialog-overlay] {
top: var(--size-8_5);
}
`