Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PreviewParameters don't work with Kotlin 1.9 #343

Open
barry-irvine opened this issue Aug 15, 2023 · 1 comment
Open

PreviewParameters don't work with Kotlin 1.9 #343

barry-irvine opened this issue Aug 15, 2023 · 1 comment

Comments

@barry-irvine
Copy link

When upgrading to Kotlin 1.9, any functions that have a preview parameter fail to process correctly.

com.airbnb.android.showkase.processor.exceptions.ShowkaseProcessorException: Make sure that the @Composable functions that you annotate with the ShowkaseComposable annotation only have a single parameter that is annotated with @PreviewParameter.

This is what my function looks like (and it works fine with Kotlin 1.8.22).

@ShowkaseComposable(name = "Small Badge", "Attraction List Item", "Loaded")
@Composable
fun ShowkasePreviewAttractionListItemSmallBadge(
    @PreviewParameter(
        AttractionSummaryPreviewParameterProvider::class,
        limit = 1
    ) attraction: Attraction
) {
    MyTheme {
        MyComposable(attraction)
    }
}
@k0siara
Copy link

k0siara commented Jan 16, 2024

Any updates on this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants