-
Notifications
You must be signed in to change notification settings - Fork 0
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 #23 from Pma913/feature/hamburg
Feature/hamburg
- Loading branch information
Showing
5 changed files
with
62 additions
and
25 deletions.
There are no files selected for viewing
Empty file.
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,33 @@ | ||
import { useState } from 'react'; | ||
import { NavLink } from 'react-router-dom'; | ||
import './Hamburg.css'; | ||
import ham from '../../utilities/hamburg.svg'; | ||
import x from '../../utilities/x.svg'; | ||
|
||
|
||
const Hamburg = () => { | ||
const [hamburger, setHamburger] = useState(false); | ||
const [hidden, setHidden] = useState('hidden'); | ||
|
||
const toggleHamburg = () => { | ||
setHamburger(!hamburger); | ||
toggleHidden(); | ||
} | ||
|
||
const toggleHidden = () => { | ||
hidden === 'hidden' ? setHidden('') : setHidden('hidden'); | ||
} | ||
|
||
return ( | ||
<div className="ham-menu-box"> | ||
<img className="hamburg" alt="" src={!hamburger ? ham : x} onClick={toggleHamburg}/> | ||
<div className={`home-menu ${hidden}`}> | ||
<NavLink className="link" to="/">home</NavLink> | ||
<NavLink className="link" to="/fact">facts</NavLink> | ||
<NavLink className="link" to="/favorites">favorites</NavLink> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default Hamburg; |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
158d266
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
cats-meow – ./
cats-meow.vercel.app
cats-meow-git-main-pma913.vercel.app
cats-meow-pma913.vercel.app