src/storybook/decorators.js
// Catch link click and stop it firing
Catch link click and stop it firing
Catch link click and stop it firing
function onClickHandler(event) {
        if (event.target?.closest("a")) {
            event.preventDefault()
        }
    }
function onClickHandler ( event ) { if ( event . target ?. closest ( "a" ) ) { event . preventDefault ( ) } }
Catch link click and stop it firing
Catch link click and stop it firing
// Check if target is, or is contained in a link