Skip to content

Commit

Permalink
Add header
Browse files Browse the repository at this point in the history
  • Loading branch information
congmul committed Jul 10, 2024
1 parent ee96066 commit 15db2a3
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Editor from './components/Editor/Editor';
import ReactSplitPane from './components/SplitPane/SplitPane';
import SwaggerUI from 'swagger-ui-react';
import petStoreAPISpec from './assets/petstore.apispec.json';
import Header from './components/Header/Header';
import Footer from './components/Footer/Footer';


Expand All @@ -29,6 +30,7 @@ function App() {
}, [leftMenuCollapse])
return (
<>
<Header />
<div className="app-wrapper">
<LeftMenu setContent={setContent} leftMenuCollapse={leftMenuCollapse} setLeftMenuCollapse={setLeftMenuCollapse} />
<div className="editor-page-wrapper" ref={rightMenuRef}>
Expand Down
11 changes: 11 additions & 0 deletions src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const Header:React.FC = ({}) => {
return(
<header>
<div className="header-wrapper">
<div>OpenAPI Specification editor</div>
</div>
</header>
)
}

export default Header;
9 changes: 9 additions & 0 deletions src/sass/components/_header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
header{
height: 100%;
padding: 15px;
border-bottom: 1px solid #d2d2d2;
.header-wrapper{
display: flex;
align-items: center;
}
}
2 changes: 1 addition & 1 deletion src/sass/components/_leftMenu.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.left-menu{
height: 100vh;
height: calc(100vh - 110px);
width: 350px;
border-right: 1px dotted var(--color-background-border);
display: flex;
Expand Down
3 changes: 2 additions & 1 deletion src/sass/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
@import "./components/readfile";
@import "./components/splitPane";
@import "./components/editor/editor";
@import "./components/header";
@import "./components/footer";

.app-wrapper{
display: flex;
height: calc(100vh - 55px);
height: calc(100vh - 110px);
.editor-page-wrapper{
position:relative;
width: calc(100vw - 350px);
Expand Down

0 comments on commit 15db2a3

Please sign in to comment.