thaw-ui / thaw

An easy to use leptos component library
https://thawui.vercel.app
MIT License
278 stars 33 forks source link

`icon` prop in `Button` does not accept a signal #130

Closed tqwewe closed 6 months ago

tqwewe commented 7 months ago

The icon prop in the Button component is of type Option<icondata_core::Icon>, which means it's not possible to change the icon based on a signal.

Is it possible for the icon prop use a signal instead?

luoxiaozero commented 7 months ago

Yes, I can change it to Option<MaybeSignal<icondata_core::Icon>>.

tqwewe commented 7 months ago

@luoxiaozero though if its Option<MaybeSignal<icondata_core::Icon>>, that means you cannot disable the button via a signal right?

Maybe MaybeSignal<Option<icondata_core::Icon>> would be better?