8.31.1 Working On Responsive Adjustments
2nd Way
Toolbars.js
Toolbars.js
import React from "react";
import Logo from "../../Logo/Logo";
import NavigationItems from "../NavigationItems/NavigationItems";
import classes from "./Toolbar.module.css";
const toolbar = (props) => (
<header className={classes.Toolbar}>
<div>MENU</div>
<div className={classes.Logo}>
<Logo />
</div>
<nav>
<NavigationItems />
</nav>
</header>
);
export default toolbar;
SideDrawer.js
SideDrawer.js
import React from "react";
import Logo from "../../Logo/Logo";
import NavigationItems from "../NavigationItems/NavigationItems";
import classes from "./SideDrawer.module.css";
const sideDrawer = (props) => {
//...
return (
<div className={classes.SideDrawer}>
<div className={classes.Logo}>
<Logo />
</div>
<nav>
<NavigationItems />
</nav>
</div>
);
};
export default sideDrawer;
Toolbar.module.css
Toolbar.module.css
.Toolbar {
height: 56px;
width: 100%;
position: fixed;
top: 0;
left: 0;
background-color: #703b09;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20px;
box-sizing: border-box;
z-index: 90;
}
.Toolbar nav {
height: 100%;
}
.Logo {
height: 80%;
}
SideDrawer.module.css
SideDrawer.module.css
.SideDrawer {
position: fixed;
width: 28px;
min-width: 280px;
height: 100%;
left: 0;
top: 0;
z-index: 200;
background-color: #fff;
padding: 32px 16px;
box-sizing: border-box;
transition: transform 0.3 ease-out;
}
@media (min-width: 500px) {
.SideDrawer {
display: none;
}
}
.Open {
transform: translateX(0);
}
.Close {
transform: translateX(-100%);
}
.Logo {
height: 11%;
}