static-cms/website/gatsby-browser.js

11 lines
253 B
JavaScript

import SmoothScroll from 'smooth-scroll';
// Make scroll behavior of internal links smooth
exports.onClientEntry = () => {
new SmoothScroll('a[href*="#"]', {
offset() {
return document.querySelector('#header').offsetHeight;
},
});
};