Merge pull request #11902 from keithjgrant/error-detail-formatting

add line wrap formatting to ErrorDetail
This commit is contained in:
Kersom 2022-03-15 08:30:12 -04:00 committed by GitHub
commit a1203e6fec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,4 @@
import 'styled-components/macro';
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
@ -68,7 +69,11 @@ function ErrorDetail({ error }) {
);
};
const renderStack = () => <CardBody>{error.stack}</CardBody>;
const renderStack = () => (
<CardBody css="white-space: pre; font-family: var(--pf-global--FontFamily--monospace)">
{error.stack}
</CardBody>
);
return (
<Expandable