mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Add PDF Preview error boundary components to Storybook (#7065)
GitOrigin-RevId: cc9ec43040b7c43a70b76e8174e92cee32445162
This commit is contained in:
parent
35b1aef765
commit
b7a5614c95
1 changed files with 22 additions and 0 deletions
|
@ -0,0 +1,22 @@
|
||||||
|
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: '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" />)
|
||||||
|
}
|
Loading…
Reference in a new issue