-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from columbiaspace/Matt-G
Added Ingress Page
- Loading branch information
Showing
5 changed files
with
93 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.ingress-container { | ||
display: flex; | ||
} | ||
|
||
.left-column { | ||
flex: 3; /* Takes up 3/4 of the width */ | ||
padding: 20px; /* Optional: Add some padding for spacing */ | ||
background-color: #f0f0f0; /* Optional: Add a background color */ | ||
} | ||
|
||
.ProcedureList { | ||
flex: 1; /* Takes up 1/4 of the width */ | ||
padding: 20px; /* Optional: Add some padding for spacing */ | ||
background-color: #e0e0e0; /* Optional: Add a background color */ | ||
} | ||
.ProcedureItem { | ||
display: none; /* Initially hide all ProcedureItems */ | ||
} | ||
|
||
.ProcedureItem.show { | ||
display: block; /* Display the ProcedureItem with the "show" class */ | ||
} | ||
|
||
.navigation-buttons { | ||
margin-top: 10px; /* Optional: Add margin for spacing */ | ||
} | ||
|
||
.navigation-buttons button { | ||
margin-right: 10px; /* Optional: Add margin between buttons */ | ||
padding: 8px 12px; /* Optional: Add padding for button styling */ | ||
cursor: pointer; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,42 @@ | ||
import React from 'react'; | ||
import React, { useState } from 'react'; | ||
import './../pages-style/ingress.css'; | ||
import { ProcedureList } from '../helpers/ProcedureList'; | ||
import ProcedureItem from '../components/ProcedureItem'; | ||
|
||
function ingress() { | ||
|
||
function Ingress() { | ||
const [currentProcedure, setCurrentProcedure] = useState(0); | ||
|
||
const handleNextProcedure = () => { | ||
setCurrentProcedure((prevIndex) => (prevIndex + 1) % ProcedureList.length); | ||
}; | ||
|
||
const handlePrevProcedure = () => { | ||
setCurrentProcedure((prevIndex) => (prevIndex - 1 + ProcedureList.length) % ProcedureList.length); | ||
}; | ||
|
||
return ( | ||
<div> | ||
<h1>Ingress</h1> | ||
<p>This page will display ingress procedures</p> | ||
<div className = "ProcedureList"> | ||
{ProcedureList.map((Item, key) =>{ | ||
return ( | ||
<div className="ingress-container"> | ||
<div className="left-column"> | ||
<h1>Ingress</h1> | ||
<p>This page will display ingress procedures</p> | ||
</div> | ||
<div className="ProcedureList"> | ||
{ProcedureList.map((Item, index) => ( | ||
<ProcedureItem | ||
key = {key} | ||
name = {Item.name} | ||
description = {Item.description} | ||
key={index} | ||
name={Item.name} | ||
description={Item.description} | ||
className={index === currentProcedure ? 'show' : ''} | ||
/> | ||
) | ||
})} | ||
))} | ||
<div className="navigation-buttons"> | ||
<button onClick={handlePrevProcedure}>< Previous</button> | ||
<button onClick={handleNextProcedure}>Next ></button> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default ingress; | ||
export default Ingress; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters