Skip to content

Commit

Permalink
Adding a <Toolbar/> Component
Browse files Browse the repository at this point in the history
  • Loading branch information
Ch-sriram committed Aug 4, 2020
1 parent 1cfe877 commit 1f5cf0c
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ Layout, Component & State Design: **[View](https://codepen.io/ch-sriram/full/JjX
17. Adding a Custom Button `<StyledButton />` Component: [Commit Details](https://github.com/Ch-sriram/burger-builder/commit/d97b727fe03205c73aaad09d223f08dd18febcb4)
18. Implementing the Functionality of the `<StyledButton />` Component: [Commit Details](https://github.com/Ch-sriram/burger-builder/commit/afd95bf43088d39c1e3a2ef626028dc4f2603259)

### Adding the Toolbar & Side Drawer
### Implementing the Toolbar & Side Drawer

1.
1. Adding a `<Toolbar />` Component: [Commit Details]()
2 changes: 1 addition & 1 deletion src/components/Layout/Layout.module.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.Content {
margin-top: 16px;
margin-top: 72px;
}
3 changes: 2 additions & 1 deletion src/components/Layout/layout.component.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React from 'react';
import Aux from '../../hoc/Auxiliary/Auxiliary.hoc';
import classes from './Layout.module.css';
import Toolbar from '../Navigation/Toolbar/Toolbar.component';

const layout = props => {
return (
<Aux>
<div>Toolbar, SideDrawer, Backdrop</div>
<Toolbar />
<main className={classes.Content}>
{props.children}
</main>
Expand Down
33 changes: 33 additions & 0 deletions src/components/Navigation/Toolbar/Toolbar.component.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React from 'react';
import styled from 'styled-components';

const Toolbar = styled.header`
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;
& nav {
height: 100%;
}
`;

const toolbar = props => (
<Toolbar>
<div>MENU</div>
<div>LOGO</div>
<nav>
...
</nav>
</Toolbar>
);

export default toolbar;

0 comments on commit 1f5cf0c

Please sign in to comment.