mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 20:53:24 +10:00
Improve PageLayout
This commit is contained in:
parent
c7bd87b0c1
commit
6234d4d4f8
3 changed files with 17 additions and 5 deletions
|
|
@ -5,9 +5,6 @@
|
|||
max-width: 375px;
|
||||
box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.25);
|
||||
position: relative;
|
||||
|
||||
/* Make the frame to fill the whole screen */
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.remove {
|
||||
|
|
|
|||
10
src/components/PageLayout/PageLayout.css
Normal file
10
src/components/PageLayout/PageLayout.css
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
.root {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
|
@ -4,6 +4,9 @@ import Helmet from 'react-helmet';
|
|||
import { withRouter } from 'react-router-dom';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { Topbar } from '../../containers';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import css from './PageLayout.css';
|
||||
|
||||
const scrollToTop = () => {
|
||||
// Todo: this might need fine tuning later
|
||||
|
|
@ -36,7 +39,7 @@ class PageLayout extends Component {
|
|||
/* eslint-enable no-console */
|
||||
|
||||
return (
|
||||
<div className={className}>
|
||||
<div className={classNames(css.root, className)}>
|
||||
<Helmet title={title} />
|
||||
{authInfoError
|
||||
? <div style={{ color: 'red' }}>
|
||||
|
|
@ -49,7 +52,9 @@ class PageLayout extends Component {
|
|||
</div>
|
||||
: null}
|
||||
<Topbar />
|
||||
{children}
|
||||
<div className={css.content}>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue