pineafan | a5ce910 | 2021-09-02 17:21:31 +0100 | [diff] [blame] | 1 | import { Component } from "react"; |
| 2 | import Styles from '../styles/navbar.module.css'; |
| 3 | |
| 4 | class NavBar extends Component { |
| 5 | constructor(props) { |
| 6 | super(props); |
| 7 | this.state = { |
| 8 | isOpen: false |
| 9 | } |
| 10 | } |
| 11 | |
| 12 | toggleVertical(prevState, force=null) { |
| 13 | this.setState(prevState => ({ |
| 14 | isOpen: (force === null) ? !prevState.isOpen : force |
| 15 | })); |
| 16 | } |
| 17 | |
| 18 | render() { |
| 19 | return ( |
| 20 | <> |
| 21 | <div className={Styles.container + " " + (this.state.isOpen ? Styles.containerOpen : null)} onMouseLeave={() => {this.toggleVertical(this.state, false)}}> |
| 22 | <div className={Styles.group}> |
| 23 | <img className={Styles.headerIcon} src="/Icons/CMP.svg" onClick={() => {this.toggleVertical(this.state)}}/> |
| 24 | <a href="/"><img className={Styles.icon} src="/Icons/CMP.svg"/></a> |
| 25 | <a href="/gps"><img className={Styles.icon} src="/Icons/GS.svg"/></a> |
| 26 | <a href="/rsm"><img className={Styles.icon} src="/Icons/RM.svg"/></a> |
| 27 | <a href="/clicksforms"><img className={Styles.icon} src="/Icons/CF.svg"/></a> |
Samuel Shuert | 52f3777 | 2021-09-02 12:29:40 -0500 | [diff] [blame^] | 28 | {/* <a href="/castaway"><img className={Styles.icon} src="/Icons/CA.svg"/></a> */} |
| 29 | {/* <a href="https://clcks.dev"><img className={Styles.icon} src="/Icons/CL.svg"/></a> */} |
pineafan | a5ce910 | 2021-09-02 17:21:31 +0100 | [diff] [blame] | 30 | </div> |
| 31 | <div className={Styles.group}> |
| 32 | <a href="/"><img className={Styles.icon} src="/Icons/CMP.svg"/></a> |
| 33 | </div> |
| 34 | </div> |
| 35 | </> |
| 36 | ) |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | export default NavBar; |