style: Alert.ErrorBoundary overflow style (#40033)

This commit is contained in:
afc163 2023-01-05 16:13:36 +08:00 committed by GitHub
parent 7d77f3173d
commit 46d733447a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,13 @@ class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundarySta
const errorDescription = typeof description === 'undefined' ? componentStack : description;
if (error) {
return (
<Alert type="error" message={errorMessage} description={<pre>{errorDescription}</pre>} />
<Alert
type="error"
message={errorMessage}
description={
<pre style={{ fontSize: '0.9em', overflowX: 'auto' }}>{errorDescription}</pre>
}
/>
);
}
return children;