thedodd / ybc

A Yew component library based on the Bulma CSS framework.
Apache License 2.0
258 stars 37 forks source link

Allow `onclick` callback property on more things like: `NavbarItem` #26

Open 05storm26 opened 2 years ago

05storm26 commented 2 years ago

Allow setting the onclick property on the NavbarItem. This would allow the creation of Single Page Applications that handle routes using javascript and update the browser history from javascript like this: https://docs.rs/yew-router/latest/yew_router/

Using A or specifically NavbarItem tags instead of buttons has the advantage that the url is actually visible to the user and they can open the link on a new tab if they wish, however if they just click on it the onclick handler runs.