1 --------------------------------------
const menuTop = () => {
window.scrollTo({ top: 0, behavior: 'smooth' });
}
2 --------------------------------------
const menuTop = function () {
window.scrollTo({ top: 0, behavior: 'smooth' });
}
3 --------------------------------------
function menuTop() {
window.scrollTo({ top: 0, behavior: 'smooth' });
}
<div className={bigMouse == false ? 'circle' : 'circle Big'} ></div>
1 --------------------------------------
.circle {
width: 20px;
height: 20px;
}
.circle.Big {
width: 40px;
height: 40px;
}
2 --------------------------------------
.circle {
width: 20px;
height: 20px;
&.Big {
width: 60px;
height: 60px;
}
}