overleaf/services/web/frontend/stories/pdf-preview-error-boundary.stories.js
Timothée Alby 6e704d2919 Merge pull request #7837 from overleaf/ta-storybook-context-fix
Storybook Fixes

GitOrigin-RevId: b2f80cec162d3d78d41a8864f9021f58370db37e
2022-05-17 08:03:16 +00:00

19 lines
592 B
JavaScript

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