davedawkins / Sutil

Lightweight front-end framework for F# / Fable. No dependencies.
https://sutil.dev
MIT License
285 stars 17 forks source link

Feliz.Bulma.DateTimePicker and other extensions #42

Open kierepka opened 2 years ago

kierepka commented 2 years ago

Hi,

How to add properly Feliz.Bulma extensions?

Html.p [
        color.hasTextWhite
        Html.text $"Data wpisu : {Db.KeyName}"
        Feliz.Bulma.DateTimePicker.dateTimePicker [
          dateTimePicker.onDateSelected (fun (d:DateTime option) -> () (* handle here *))
          dateTimePicker.defaultValue DateTime.Now
        ]
      ]

Gives error: Sutil and ReactElement is not compatible

Kind regards

davedawkins commented 2 years ago

The main problem here is that the component being used there is a React component, and Sutil does not interoperate with React (at least, not yet).

Having said that, Sutil does have support for the main Bulma (CSS) framework, and I would like it to be able to make use of these extensions. Let me take a look and see what effort is required.

Thanks for logging the issue

kierepka commented 2 years ago

Ok! I've seen support for other libraries from Feliz.Bulma.*, so I thought there were some ready-made functions for translating React components to "regular" Bulma;)

davedawkins commented 2 years ago

Can you show me an example of what you've seen, in case I'm missing something?

On Mon, 20 Sep 2021 at 06:33, Mateusz Kierepka @.***> wrote:

Ok! I've seen support for other libraries from Feliz.Bulma.*, so I thought there were some ready-made functions for translating React components to "regular" Bulma;)

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/davedawkins/Sutil/issues/42#issuecomment-922647938, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACFV3LOFCBIFC6F44UYT3TUC3BSHANCNFSM5EKOGQ5A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

kierepka commented 2 years ago

Ok - I did not check it thoroughly. There is Feliz.Bulma and Feliz.Engine.Bulma

AngelMunoz commented 2 years ago

@kierepka you might want to check back again, there's now support to render react elements within Sutil https://sutil.dev/#documentation-hosting-react