overleaf/services/web/frontend/stories/pdf-preview-error-boundary.stories.js
Alf Eaton d905863002 Merge pull request #8747 from overleaf/ae-error-boundary-fallback
Create a generic ErrorBoundaryFallback component

GitOrigin-RevId: 0c9200ddef2be3b90030a32eb8c36a59047cf2b4
2022-08-10 08:03:51 +00:00

20 lines
627 B
JavaScript

import PdfPreviewErrorBoundaryFallback from '../js/features/pdf-preview/components/pdf-preview-error-boundary-fallback'
import { ScopeDecorator } from './decorators/scope'
export default {
title: 'Editor / PDF Preview / Error Boundary',
component: PdfPreviewErrorBoundaryFallback,
decorators: [ScopeDecorator],
}
export const PreviewErrorBoundary = () => {
return <PdfPreviewErrorBoundaryFallback type="preview" />
}
export const PdfErrorBoundary = () => {
return <PdfPreviewErrorBoundaryFallback type="pdf" />
}
export const LogsErrorBoundary = () => {
return <PdfPreviewErrorBoundaryFallback type="logs" />
}