compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

Theming @Preview Annotation

Open FrankDomburg opened this issue 2 years ago • 0 comments

Wrapping my head around @Preview annotation in Android Studio (and hoisting state up)

What I don't like is that when I'd like to see previews in my app's theme, I need to wrap the preview in a theme and thus to have a separate @composable. Especially since I can do light/dark in the preview annotation's parameters.

In my view, the theme should be specifiable in the preview parameter (which is probably more generic as a solution), or default to using Material3. That way, the @Preview annotation and the actual definition of a @Composable can be combined in 99% of all cases.

FrankDomburg avatar Aug 02 '22 07:08 FrankDomburg