I have a src/components/UI/Sidebar.svelte component with a variable toggle.
export let toggle = true;
I would like to add a classname of "noscroll" to the <body> when toggle is true to lock the body scroll. I have added this on the src/template.html
<style>
.noscroll { position: fixed; overflow-y:scroll };
</style>
What would be the best way to implement a y-axis scroll lock like this when the sidebar is open?