@lobehub/editor
Version:
A powerful and extensible rich text editor built on Meta's Lexical framework, providing a modern editing experience with React integration.
26 lines (25 loc) • 718 B
JavaScript
/**
* 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 ReactErrorBoundary } from 'react-error-boundary';
import { jsx as _jsx } from "react/jsx-runtime";
export function LexicalErrorBoundary(_ref) {
var children = _ref.children,
onError = _ref.onError;
return /*#__PURE__*/_jsx(ReactErrorBoundary, {
fallback: /*#__PURE__*/_jsx("div", {
style: {
border: '1px solid #f00',
color: '#f00',
padding: '8px'
},
children: "An error was thrown."
}),
onError: onError,
children: children
});
}