diff --git a/packages/docz/src/components/DocPreview.tsx b/packages/docz/src/components/DocPreview.tsx index c83c1ee27..da5aed138 100644 --- a/packages/docz/src/components/DocPreview.tsx +++ b/packages/docz/src/components/DocPreview.tsx @@ -13,6 +13,7 @@ export type PageProps = RouteComponentProps & { export interface ComponentsMap { loading?: React.ComponentType page?: React.ComponentType + notFound?: React.ComponentType> render?: RenderComponent h1?: React.ComponentType h2?: React.ComponentType @@ -41,6 +42,7 @@ export interface DocPreviewProps { export const DocPreview: SFC = ({ components = {} }) => { const Page = components.page + const NotFound = components.notFound const LoadingComponent = components.loading || DefaultLoading return ( @@ -73,6 +75,7 @@ export const DocPreview: SFC = ({ components = {} }) => { ) ) })} + {NotFound && } )}