diff options
Diffstat (limited to 'react-frontend/src/components/EdgeInfo.js')
-rw-r--r-- | react-frontend/src/components/EdgeInfo.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/react-frontend/src/components/EdgeInfo.js b/react-frontend/src/components/EdgeInfo.js index e69de29..60af0e8 100644 --- a/react-frontend/src/components/EdgeInfo.js +++ 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 |