UNPKG

@lexical/react

Version:

This package provides Lexical components and hooks for React applications.

10 lines (8 loc) 504 B
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import{ErrorBoundary as r}from"react-error-boundary";import{jsx as o}from"react/jsx-runtime";function n({children:n,onError:e}){return o(r,{fallback:o("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:e,children:n})}export{n as LexicalErrorBoundary};