Dzoukr / Feliz.DaisyUI

Feliz wrapper for DaisyUI TailwindCSS component library
https://dzoukr.github.io/Feliz.DaisyUI
MIT License
46 stars 10 forks source link

button.loading should be deprecated #14

Closed mattgallagher92 closed 2 months ago

mattgallagher92 commented 2 months ago

It looks like the way daisyUI now represents buttons with loading spinners is by having a span with the loading class as a child of the button. The Feliz.DaisyUI equivalent is

Daisy.button.button [
    button.primary
    prop.children [
        Daisy.loading
    ]
]

which renders nicely:

image

However, the Feliz.DaisyUI API implies that something like this is sensible

Daisy.button.button [
    button.primary
    button.loading
]

which doesn't render well:

image

I recommend marking button.loading as deprecated, with a message advising use of Daisy.loading as a child instead.

Dzoukr commented 2 months ago

Good point, fixed now!