overleaf/services/web/frontend/stories/pdf-preview-error-boundary.stories.js
Alf Eaton 199ab985a0 Merge pull request #7223 from overleaf/ta-storybook-organise
Reorganise Storybook Stories

GitOrigin-RevId: 91014f49f84c645f87091724f03a007b731a8ad5
2022-04-05 12:16:53 +00:00

22 lines
658 B
JavaScript

import ErrorBoundaryFallback from '../js/features/pdf-preview/components/error-boundary-fallback'
import { setupContext } from './fixtures/context'
import { withContextRoot } from './utils/with-context-root'
export default {
title: 'Editor / PDF Preview / Error Boundary',
component: ErrorBoundaryFallback,
}
setupContext()
export const PreviewErrorBoundary = () => {
return withContextRoot(<ErrorBoundaryFallback type="preview" />)
}
export const PdfErrorBoundary = () => {
return withContextRoot(<ErrorBoundaryFallback type="pdf" />)
}
export const LogsErrorBoundary = () => {
return withContextRoot(<ErrorBoundaryFallback type="logs" />)
}