aboutsummaryrefslogtreecommitdiff
path: root/react-frontend/src/components/EdgeInfo.js
diff options
context:
space:
mode:
Diffstat (limited to 'react-frontend/src/components/EdgeInfo.js')
-rw-r--r--react-frontend/src/components/EdgeInfo.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/react-frontend/src/components/EdgeInfo.js b/react-frontend/src/components/EdgeInfo.js
new file mode 100644
index 0000000..60af0e8
--- /dev/null
+++ b/react-frontend/src/components/EdgeInfo.js
@@ -0,0 +1,31 @@
+
+import '../css/UserCheckin.css';
+
+/**
+ * Componenet for checkins. Has a toggle to show more info.
+ * @param {Object} props The props of the component.
+ * @returns {import('react').HtmlHTMLAttributes} A list element holding a checkin's info.
+ */
+function EdgeInfo(props) {
+ // State - toggled
+
+ const stockList = props.stockList;
+
+ /* const stockInfo = stockList.map((stock) =>
+ <li>{stock}</li>
+ );*/
+
+ const hideSelf = () => {
+ props.setHideInfo(true);
+ }
+
+ return (
+ <div className='edge-info-wrapper'>
+ <p onClick={hideSelf}> X </p>
+ <div className = 'edge-info'>
+ {stockList}
+ </div>
+ </div>);
+}
+
+export default EdgeInfo; \ No newline at end of file