component: add SideDrawer component
This commit is contained in:
parent
67a49ad12b
commit
4b0878dd16
@ -3,10 +3,12 @@ import React from 'react';
|
|||||||
import Aux from '../../hoc/Auxiliary';
|
import Aux from '../../hoc/Auxiliary';
|
||||||
import classes from './Layout.css';
|
import classes from './Layout.css';
|
||||||
import Toolbar from '../Navigation/Toolbar/Toolbar';
|
import Toolbar from '../Navigation/Toolbar/Toolbar';
|
||||||
|
import SideDrawer from '../Navigation/SideDrawer/SideDrawer';
|
||||||
|
|
||||||
const layout = (props) => (
|
const layout = (props) => (
|
||||||
<Aux>
|
<Aux>
|
||||||
<Toolbar />
|
<Toolbar />
|
||||||
|
<SideDrawer />
|
||||||
<main className={classes.Content}>
|
<main className={classes.Content}>
|
||||||
{props.children}
|
{props.children}
|
||||||
</main>
|
</main>
|
||||||
|
27
src/components/Navigation/SideDrawer/SideDrawer.css
Normal file
27
src/components/Navigation/SideDrawer/SideDrawer.css
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
.SideDrawer {
|
||||||
|
position: fixed;
|
||||||
|
width: 280px;
|
||||||
|
max-width: 70%;
|
||||||
|
height: 100%;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
z-index: 200;
|
||||||
|
background-color: white;
|
||||||
|
padding: 32px 16px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
transition: transform 0.3s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 500px) {
|
||||||
|
.SideDrawer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.Open {
|
||||||
|
transform: translateX(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.Close {
|
||||||
|
transform: translateX(-100%);
|
||||||
|
}
|
19
src/components/Navigation/SideDrawer/SideDrawer.js
Normal file
19
src/components/Navigation/SideDrawer/SideDrawer.js
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
import classes from './SideDrawer.css';
|
||||||
|
import Logo from '../../Logo/Logo';
|
||||||
|
import NavigationItems from '../NavigationItems/NavigationItems';
|
||||||
|
|
||||||
|
const sideDrawer = () => {
|
||||||
|
return (
|
||||||
|
<div className={classes.SideDrawer}>
|
||||||
|
<Logo />
|
||||||
|
<nav>
|
||||||
|
<NavigationItems />
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export default sideDrawer;
|
Loading…
Reference in New Issue
Block a user