This is Header component with React-Bootstrap. I created a menu icon with pure CSS but I want to change the icon function onClick but I’m getting the error – TypeError: Cannot read property 'toggle' of undefined
. It’s there any way I’m getting it wrongly? Kindly check. Thanks.
Also, it’s there a way, I can handle this with React Hooks method instead?
Thanks.
import styles from './Landing.module.css';
import './Landing.module.css';;
const openMenu = (open) => {
open.classList.toggle('change');
};
<Nav className="ml-auto">
<div className={styles.allMenus}>
<div className="menuIcon" onClick={openMenu}>
<div className={styles.bar1}></div>
<div className={styles.bar2}></div>
<div className={styles.bar3}></div>
</div>
</div>
</Nav>
My CSS – It has the change styles
div[class="menuIcon"] {
background-color: #ffffff;
padding: 13px;
margin-right: 46px;
float: right;
cursor: pointer;
}
.bar1, .bar2, .bar3 {
width: 32px;
height: 3px;
background-color: #333;
margin: 6px 0;
transition: 0.4s;
}
.change .bar1 {
-webkit-transform: rotate(-45deg) translate(-9px, 6px) ;
transform: rotate(-45deg) translate(-9px, 6px) ;
}
.change .bar2 {
opacity: 0;
}
.change .bar3 {
-webkit-transform: rotate(45deg) translate(-8px, -8px) ;
transform: rotate(45deg) translate(-8px, -8px) ;
}
price of prednisone 5mg – prednisone 10 mg online prescription prednisone cost
512807 319058Oh my goodness! an incredible post dude. Thank you Nonetheless Im experiencing challenge with ur rss . Don know why Unable to subscribe to it. Is there anyone acquiring comparable rss drawback? Anybody who knows kindly respond. Thnkx 967226
645171 776723Sorry for the huge review, but Im truly loving the new Zune, and hope this, as nicely as the exceptional reviews some other individuals have written, will help you decide if it is the right choice for you. 826200
prednisone price australia – generic prednisone buy prednisone nz
sildalis pills – buy diflucan 200mg sale order glucophage online
cheap ampicillin – order metronidazole 400mg for sale buy generic plaquenil 400mg
canada generic tadalafil tadalafil cialis
generic cialis online fast shipping tadalafil generic
74260 824720Quite clear website , regards for this post. 880423
tadalafil blood pressure what is tadalafil
tadalafil brands generic cialis tadalafil
cost of cialis tadalafil generic
https://cialisbusd.com/ tadalafil cialis
cheap generic cialis for sale tadalafil blood pressure
https://cialisbusd.com/ where to order tadalafil tablets
cheap cialis pills for sale https://nextadalafil.com/
830969 479276Im having a bit problem I cant subscribe your feed, Im using google reader fyi. 839666
ivermectin cost buy ivermectin 12 mg buy stromectol usa
http://www.ivermectinusd.com/ buy 12 mg stromectol