hotfix: remove layout absolute position
This commit is contained in:
parent
80cb238190
commit
6658bc9825
|
@ -4,12 +4,7 @@ import React from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
const Layout = styled.div`
|
const Layout = styled.div`
|
||||||
display: flex;
|
width: 100%;
|
||||||
flex-direction: column;
|
|
||||||
position: absolute;
|
|
||||||
width: calc(100vw - 200px);
|
|
||||||
left: 200px;
|
|
||||||
top: 0;
|
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background: ${props => props.theme.colors.secondary};
|
background: ${props => props.theme.colors.secondary};
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -9,9 +9,6 @@ const Wrapper = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
font-family: ${props => props.theme.fontFamily}
|
font-family: ${props => props.theme.fontFamily}
|
||||||
background-color: ${props => props.theme.colors.sidebarBg};
|
background-color: ${props => props.theme.colors.sidebarBg};
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
import React, { Fragment } from 'react';
|
import React from 'react';
|
||||||
import { Route, Switch } from 'react-router-dom';
|
import { Route, Switch } from 'react-router-dom';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { ScrollTopComponent } from './scroll-top';
|
import { ScrollTopComponent } from './scroll-top';
|
||||||
import { SidebarContainer } from '../containers/sidebar';
|
import { SidebarContainer } from '../containers/sidebar';
|
||||||
|
@ -17,8 +18,14 @@ import {
|
||||||
DASHBOARD_ROUTE, SEND_ROUTE, RECEIVE_ROUTE, SETTINGS_ROUTE, CONSOLE_ROUTE,
|
DASHBOARD_ROUTE, SEND_ROUTE, RECEIVE_ROUTE, SETTINGS_ROUTE, CONSOLE_ROUTE,
|
||||||
} from '../constants/routes';
|
} from '../constants/routes';
|
||||||
|
|
||||||
|
const Wrapper = styled.div`
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
width: 100vw;
|
||||||
|
`;
|
||||||
|
|
||||||
export const RouterComponent = () => (
|
export const RouterComponent = () => (
|
||||||
<Fragment>
|
<Wrapper>
|
||||||
<SidebarContainer />
|
<SidebarContainer />
|
||||||
<ScrollTopComponent>
|
<ScrollTopComponent>
|
||||||
{/* $FlowFixMe */}
|
{/* $FlowFixMe */}
|
||||||
|
@ -33,5 +40,5 @@ export const RouterComponent = () => (
|
||||||
</Switch>
|
</Switch>
|
||||||
</LayoutComponent>
|
</LayoutComponent>
|
||||||
</ScrollTopComponent>
|
</ScrollTopComponent>
|
||||||
</Fragment>
|
</Wrapper>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue