@arolariu/components
Version:
🎨 70+ beautiful, accessible React components built on Base UI. TypeScript-first, CSS Modules styling, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡
17 lines (16 loc) • 651 B
JavaScript
import { jsx } from "react/jsx-runtime";
import { ErrorBoundary } from "./error-boundary.js";
import { Spinner } from "./spinner.js";
import * as __rspack_external_react from "react";
function AsyncBoundary({ children, loadingFallback, ...errorBoundaryProps }) {
return /*#__PURE__*/ jsx(ErrorBoundary, {
...errorBoundaryProps,
children: /*#__PURE__*/ jsx(__rspack_external_react.Suspense, {
fallback: loadingFallback ?? /*#__PURE__*/ jsx(Spinner, {}),
children: children
})
});
}
AsyncBoundary.displayName = "AsyncBoundary";
export { AsyncBoundary };
//# sourceMappingURL=async-boundary.js.map