Using events in JSX (react)

I have some questions regarding events and the use of the in JSX. I have created a toggle component using stencil (sdds/tegel/src/components/toggle at main · scania-digital-design-system/sdds · GitHub), that I have then tested in a react environment (tegel-demo-pages/ModeSwitcher.tsx at 341f3e9e6c37eff592f307625df35e721f6654b0 · scania-digital-design-system/tegel-demo-pages · GitHub). However I am currently using the onClick method because the sddsToggle event can’t be used on the component. Does anyone know why?
If I add an event listener to the document and listen for the sddsToggle I can see that the event is being fired, but it does not work when I try to bind it to the component (using onSddsToggle).