static-cms/website/gatsby-browser.js

11 lines
252 B
JavaScript
Raw Normal View History

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