Skip to content

Commit

Permalink
feat(docz-theme-default): add custom not found component
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Jun 9, 2018
1 parent 455dcca commit 1773fe1
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
31 changes: 31 additions & 0 deletions packages/docz-theme-default/src/components/ui/NotFound.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import * as React from 'react'
import styled from 'react-emotion'

const Wrapper = styled('div')`
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
width: 100%;
height: 100%;
`

const Title = styled('h1')`
margin: 0;
font-size: 48px;
color: ${p => p.theme.colors.primary};
`

const Subtitle = styled('p')`
margin: 0;
font-size: 22px;
`

export const NotFound = () => (
<Wrapper>
<Title>Page Not Found</Title>
<Subtitle>
Check if you haven't changed the document route or delete it!
</Subtitle>
</Wrapper>
)
1 change: 1 addition & 0 deletions packages/docz-theme-default/src/components/ui/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export { H5 } from './H5'
export { H6 } from './H6'
export { List } from './List'
export { Loading } from './Loading'
export { NotFound } from './NotFound'
export { Page } from './Page'
export { Pre } from './Pre'
export { Render } from './Render'
Expand Down
1 change: 1 addition & 0 deletions packages/docz-theme-default/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const Theme = () => (
<DocPreview
components={{
page: components.Page,
notFound: components.NotFound,
render: components.Render,
h1: components.H1,
h2: components.H2,
Expand Down

0 comments on commit 1773fe1

Please sign in to comment.