Dzoukr / Feliz.DaisyUI

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

button.loading deprecation #15

Open sandeepc24 opened 2 months ago

sandeepc24 commented 2 months ago

I have upgraded to latest DaisyUI and get following warning

image

How can I fix this?

Dzoukr commented 2 months ago

Use https://daisyui.com/components/loading/

sandeepc24 commented 2 months ago

How can I show spinner inside button as is the case with this button.

sandeepc24 commented 2 months ago

Something like

image
Freymaurer commented 1 week ago

@sandeepc24 daisyui uses css classes for styling. So the you if you are unable to find something in Feliz.DaisyUI you can always click on the "HTML" tab next to "Preview" and find the following:

<button class="btn">
  <span class="loading loading-spinner"></span>
  loading
</button>

Which you can translate to Feliz style with

Html.button [
  prop.className "btn"
  prop.children [
    Html.span [prop.className "loading loading-spinner"]
    Html.text "loading"
  ]
]

Feliz.DaisyUI provides wrappers for these functions to make you write less "prop.children"/"prop.className" with discoverable api, but if everything fails you can always fallback to this.

Hope this helped 🙂