Hopefully this is helpful to somebody, I have crea...
# compose-desktop
a
Hopefully this is helpful to somebody, I have created a library to workaround the fact the Desktop previews in IntelliJ are half-baked and in general very limited respect to the Android ones. In future, I might think of writing a wrapper of the IntelliJ Preview plugin to use it via an annotation. Here's the library, hope somebody will enjoy and please leave feedback via issues! https://github.com/alexfacciorusso/compose-previewer
🙌 2
👏 2
Here's a screenshot to give context:
c
that's really cool
k
Nice work!
m
Is it possible to have previews in common code?
a
Thanks! @Mikolaj Unfortunately it is not possible to have previews in the common code as the engine wouldn't know how to generate the preview itself. This library is only for desktop as the Android preview engine is quite good and complete. You can have preview for the common code if you create the preview in one of the platforms. E.g. the UI composable in the common module, and the
@Preview
composable in either Android or Desktop.
m
Thanks @alexfacciorusso! I will try that