Commit 28b40a5d authored by Krisztian Puska's avatar Krisztian Puska Committed by Arunoda Susiripala

Update debug error colors (#2182)

* Update debug error colors

* Soften colors

* Color tweaks, use zeit red w white header
parent 5fa03f94
...@@ -7,7 +7,7 @@ export default ({ error, error: { name, message, module } }) => ( ...@@ -7,7 +7,7 @@ export default ({ error, error: { name, message, module } }) => (
<Head> <Head>
<meta name='viewport' content='width=device-width, initial-scale=1.0' /> <meta name='viewport' content='width=device-width, initial-scale=1.0' />
</Head> </Head>
{module ? <div style={styles.heading}>Error in {module.rawRequest}</div> : null} {module ? <h1 style={styles.heading}>Error in {module.rawRequest}</h1> : null}
{ {
name === 'ModuleBuildError' name === 'ModuleBuildError'
? <pre style={styles.stack} dangerouslySetInnerHTML={{ __html: ansiHTML(encodeHtml(message)) }} /> ? <pre style={styles.stack} dangerouslySetInnerHTML={{ __html: ansiHTML(encodeHtml(message)) }} />
...@@ -27,10 +27,10 @@ const StackTrace = ({ error: { name, message, stack } }) => ( ...@@ -27,10 +27,10 @@ const StackTrace = ({ error: { name, message, stack } }) => (
const styles = { const styles = {
errorDebug: { errorDebug: {
background: '#a6004c', background: '#0e0d0d',
boxSizing: 'border-box', boxSizing: 'border-box',
overflow: 'auto', overflow: 'auto',
padding: '15px', padding: '24px',
position: 'fixed', position: 'fixed',
left: 0, left: 0,
right: 0, right: 0,
...@@ -42,19 +42,22 @@ const styles = { ...@@ -42,19 +42,22 @@ const styles = {
stack: { stack: {
fontFamily: '"SF Mono", "Roboto Mono", "Fira Mono", consolas, menlo-regular, monospace', fontFamily: '"SF Mono", "Roboto Mono", "Fira Mono", consolas, menlo-regular, monospace',
fontSize: '13px', fontSize: '13px',
color: '#fbe7f1', lineHeight: '18px',
color: '#b3adac',
margin: 0, margin: 0,
whiteSpace: 'pre-wrap', whiteSpace: 'pre-wrap',
wordWrap: 'break-word', wordWrap: 'break-word',
marginTop: '20px' marginTop: '16px'
}, },
heading: { heading: {
fontFamily: '-apple-system, system-ui, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif', fontFamily: '-apple-system, system-ui, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif',
fontSize: '15px', fontSize: '20px',
fontWeight: 'bold', fontWeight: '400',
color: '#febfdd', lineHeight: '28px',
marginBottom: '5px' color: '#fff',
marginBottom: '0px',
marginTop: '0px'
} }
} }
...@@ -66,12 +69,12 @@ const encodeHtml = str => { ...@@ -66,12 +69,12 @@ const encodeHtml = str => {
// https://github.com/babel/babel/blob/master/packages/babel-code-frame/src/index.js // https://github.com/babel/babel/blob/master/packages/babel-code-frame/src/index.js
ansiHTML.setColors({ ansiHTML.setColors({
reset: ['fff', 'a6004c'], reset: ['6F6767', '0e0d0d'],
darkgrey: 'e54590', darkgrey: '6F6767',
yellow: 'ee8cbb', yellow: '6F6767',
green: 'f2a2c7', green: 'ebe7e5',
magenta: 'fbe7f1', magenta: 'ebe7e5',
blue: 'fff', blue: 'ebe7e5',
cyan: 'ef8bb9', cyan: 'ebe7e5',
red: 'fff' red: 'ff001f'
}) })
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment