Skip to content

Commit

Permalink
fix error formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
djechlin-mongodb committed Dec 19, 2024
1 parent 7cc65fe commit 4149efd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/browser-repl/src/components/shell-output-line.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const shellOutputLine = css({
});

const shellOutputLineError = css({
backgroundColor: palette.red.light2,
color: palette.red.dark3,
backgroundColor: 'inherit',
color: palette.red.light1,
});

const shellOutputLineIcon = css({
Expand Down
11 changes: 10 additions & 1 deletion packages/browser-repl/src/components/types/error-output.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { isShouldReportAsBugError } from '@mongosh/errors';
import { css, cx, palette } from '@mongodb-js/compass-components';

import { SimpleTypeOutput } from './simple-type-output';
import { Expandable } from '../utils/expandable';
Expand All @@ -10,6 +11,14 @@ interface ErrorOutputProps {
value: any;
}

const errInfo = css({
pre: {
borderLeft: '3px solid',
paddingLeft: '0px',
borderColor: palette.red.light2,
},
});

export class ErrorOutput extends Component<ErrorOutputProps> {
static propTypes = {
value: PropTypes.any,
Expand Down Expand Up @@ -87,7 +96,7 @@ export class ErrorOutput extends Component<ErrorOutputProps> {
return (
<div>
{this.renderCollapsed(toggle)}
<div>
<div className={cx(errInfo)}>
{this.formatErrorBugReportInfo()}
{this.formatErrorInfo()}
{this.formatErrorResult()}
Expand Down

0 comments on commit 4149efd

Please sign in to comment.