From 1b0e09dc9298a9e219bc1e62724aad040f76726b Mon Sep 17 00:00:00 2001 From: Joss Mackison Date: Sat, 24 Nov 2018 00:41:11 +1100 Subject: [PATCH] fix(docz): resolve react warnings in ErrorReporter (#465) - `div` is invalid descendent of `p` - no keys on mapped children --- packages/docz/src/components/ErrorBoundary.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/docz/src/components/ErrorBoundary.tsx b/packages/docz/src/components/ErrorBoundary.tsx index a676d0549..996519563 100644 --- a/packages/docz/src/components/ErrorBoundary.tsx +++ b/packages/docz/src/components/ErrorBoundary.tsx @@ -30,6 +30,8 @@ const styles: StylesMap = { stack: { display: 'flex', flexDirection: 'column', + marginBottom: '1em', + marginTop: '1em', }, } @@ -40,11 +42,11 @@ const ErrorReporter: SFC = ({ error, componentStack }) => ( {error &&
{error.message}
}

Stack trace

{componentStack && ( -

+

{componentStack.split('\n').map(str => ( -
{str}
+
{str}
))} -

+
)}