Has anyone tried creating a site/browser extension with material components web? They have a react component in js, though I'm curious if there is a kotlin version anywhere
I’m aware of materialize, but I wanted to know if there were other things oriented to the official mdc. With materialize as well, there are no kotlin interfaces, so I think any type safety would have to be defined manually.
An extension of my question would be what nice approaches there are to adding kotlin interfaces to ui libraries that don’t support it. I will take a look at kvision and see what that introduces.
g
gbaldeck
10/13/2018, 6:14 PM
Materialize is just a css library. So you could use the kotlin react wrapper or kotlinx-html and just add the classes to your elements and components. Its pretty much the same thing as if you were doing it in html, you just add the css classes to the elements
gbaldeck
10/13/2018, 6:18 PM
if you want type safe css, check out kotlin-css and kotlin-styled here: https://github.com/JetBrains/kotlin-wrappers Though in my opinion type safe css is not every useful and I prefer keeping my stylesheets separate and use sass as a preprocessor
a
Allan Wang
10/13/2018, 6:52 PM
Materialize depends on jQuery for a lot of their interactions, and as a result isn't super great with react and other frameworks. CSS wise I'm fine with using sass, and I think MDC has that as well
g
gbaldeck
10/13/2018, 8:38 PM
Actually I decided to give kotlin-styled another try, and it actually is really nice. Having single file components is pretty great in my Kotlin React project