static-cms/website/gatsby-browser.js

10 lines
259 B
JavaScript
Raw Normal View History

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