diff options
Diffstat (limited to 'src/components/ErrorBoundary.tsx')
-rw-r--r-- | src/components/ErrorBoundary.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/ErrorBoundary.tsx b/src/components/ErrorBoundary.tsx index 4429f72..86a5946 100644 --- a/src/components/ErrorBoundary.tsx +++ b/src/components/ErrorBoundary.tsx @@ -102,11 +102,11 @@ const ErrorBoundary = LazyComponent(() => { }; }) as React.ComponentType<React.PropsWithChildren<Props>> & { - wrap<T extends JSX.IntrinsicAttributes = any>(Component: React.ComponentType<T>): React.ComponentType<T>; + wrap<T extends JSX.IntrinsicAttributes = any>(Component: React.ComponentType<T>, errorBoundaryProps?: Props): React.ComponentType<T>; }; -ErrorBoundary.wrap = Component => props => ( - <ErrorBoundary> +ErrorBoundary.wrap = (Component, errorBoundaryProps) => props => ( + <ErrorBoundary {...errorBoundaryProps}> <Component {...props} /> </ErrorBoundary> ); |