export const Header = () => {
const header = document.querySelector('.header');
if (!header) return false;
const active = () => {
if (window.pageYOffset || document.documentElement.scrollTop <= 0) {
header.classList.remove('active');
}
if (window.pageYOffset || document.documentElement.scrollTop > 20) {
header.classList.add('active');
}
};
active();
window.addEventListener('scroll', active, false);
}