aboutsummaryrefslogtreecommitdiff
path: root/react-frontend/src/components/EdgeInfo.js
blob: 60af0e82e6649ac76c1064a3e3b105c37f0c50f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;