Add new 404 page

This commit is contained in:
Fred Carlsen
2019-02-20 16:41:42 +01:00
parent 154e7a6a8a
commit 9a7ccc20e8
3 changed files with 47 additions and 31 deletions

View File

@@ -9,6 +9,7 @@ import { GlobalStyles } from 'ts/constants/globalStyle';
interface Props {
theme?: 'dark' | 'light' | 'gray';
isFullScreen?: boolean;
children: any;
}
@@ -18,6 +19,7 @@ interface State {
interface MainProps {
isNavToggled: boolean;
isFullScreen?: boolean;
}
export interface ThemeValuesInterface {
@@ -118,7 +120,7 @@ export class SiteWrap extends React.Component<Props, State> {
};
public render(): React.ReactNode {
const { children, theme = 'dark' } = this.props;
const { children, theme = 'dark', isFullScreen } = this.props;
const { isMobileNavOpen } = this.state;
const currentTheme = GLOBAL_THEMES[theme];
@@ -130,7 +132,7 @@ export class SiteWrap extends React.Component<Props, State> {
<Header isNavToggled={isMobileNavOpen} toggleMobileNav={this.toggleMobileNav} />
<Main isNavToggled={isMobileNavOpen}>{children}</Main>
<Main isNavToggled={isMobileNavOpen} isFullScreen={isFullScreen}>{children}</Main>
<Footer />
</>
@@ -143,4 +145,10 @@ export class SiteWrap extends React.Component<Props, State> {
const Main = styled.main<MainProps>`
transition: transform 0.5s, opacity 0.5s;
opacity: ${props => props.isNavToggled && '0.5'};
${props => props.isFullScreen && `
display: flex;
align-items: center;
min-height: calc(100vh - 108px - 381px);
`}
`;