Hi Jamie,
I have implemented exactly what you want, also using suggestions from that post. I have put buttons in my layout,
What do you mean you cannot link to a current session? I have done it like this.
This is nanoflow behind my 'moon' button.
With JS code:
import "mx-global";
import { Big } from "big.js";
export async function JS_DarkMode_Enable(isEnabled) {
document.body.classList.add("darkmode");
}
And 'Sun' button has just IsEnabled set to false, and code document.body.classList.remove("darkmode");
Here are the images