Skip to content

Commit f8a2a5e

Browse files
author
Brian Vaughn
committed
Error overlay is full-screen now based on feedback
1 parent 7936dde commit f8a2a5e

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

packages/react-error-overlay/src/components/overlay.js

-8
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,6 @@ function createOverlay(
8484
// Show message
8585
container.appendChild(createFooter(document));
8686

87-
// Clicks to background overlay should dismiss error popup.
88-
overlay.addEventListener('click', closeCallback);
89-
90-
// Clicks within the popup should not dismiss it.
91-
container.addEventListener('click', function(event: Event) {
92-
event.stopPropagation();
93-
});
94-
9587
return {
9688
overlay,
9789
additional,

packages/react-error-overlay/src/styles.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ const overlayStyle = {
2020
width: '100%',
2121
height: '100%',
2222
'box-sizing': 'border-box',
23-
'background-color': 'rgba(0,0,0,.5)',
24-
padding: '0.5rem',
2523
'text-align': 'center',
24+
'background-color': white,
2625
};
2726

2827
const containerStyle = {
2928
position: 'relative',
3029
display: 'inline-flex',
3130
'flex-direction': 'column',
32-
'max-height': '100%',
31+
height: '100%',
32+
width: '1024px',
3333
'max-width': '100%',
3434
'overflow-x': 'hidden',
3535
'overflow-y': 'auto',
@@ -41,10 +41,7 @@ const containerStyle = {
4141
'white-space': 'pre-wrap',
4242
'word-break': 'break-word',
4343
'line-height': 1.5,
44-
'background-color': white,
4544
color: black,
46-
'border-radius': '0.25rem',
47-
'box-shadow': '0 0 10px 0 rgba(0, 0, 0, 0.15)',
4845
};
4946

5047
const hintsStyle = {
@@ -73,12 +70,14 @@ const additionalStyle = {
7370
};
7471

7572
const headerStyle = {
76-
'font-size': '1.7em',
73+
'font-size': '2em',
7774
'font-family': 'sans-serif',
7875
color: red,
7976
'white-space': 'pre-wrap',
8077
margin: '0.75rem 2rem 0 0', // Prevent overlap with close button
8178
flex: '0 0 auto',
79+
'max-height': '35%',
80+
overflow: 'auto',
8281
};
8382

8483
const functionNameStyle = {

0 commit comments

Comments
 (0)