I need a toggle button which displays images (i.e. ImageToggleButton).

Right now, the way ImageButton works is that the main component modifies the 
element to show an image. This works only if you want a single image no matter 
what the state of the button is. If you want different images on hover, active, 
selected, etc. that requires a separate component. Additionally, I wanted a 
button in an app which uses images for states. I ended up just using a plain 
old div and setting the background image via css for the different states. 
Adding components for each and every use case seems broken.

Ideally, with Royale architecture, the component should really be much more 
about the behavior of the component and the view should be delegated to a bead.

I’m thinking that the logic which sets the html of the element should be a a 
view bead. Any thoughts about reworking this?

Harbs

Reply via email to