airbnb / Showkase

🔦 Showkase is an annotation-processor based Android library that helps you organize, discover, search and visualize Jetpack Compose UI elements
https://medium.com/airbnb-engineering/introducing-showkase-a-library-to-organize-discover-and-visualize-your-jetpack-compose-elements-d5c34ef01095
Apache License 2.0
2.13k stars 107 forks source link

Allow disable default padding for showkase card #239

Open rovkinmax opened 2 years ago

rovkinmax commented 2 years ago

For some reasons list items has they own padding and when I add it in to Showkase, browser add additional padding and for designers and me final view has wrong spaces.
For example, on this pic space is too large

Снимок экрана 2022-06-28 в 15 51 21
Holoceo commented 2 years ago

Workaround for this - you can add container for your previews with an elevation:

fun CustomPreview(
    content: @Composable () -> Unit
) {
    CustomTheme() {
        Surface(
            color = CustomTheme.colors.background,
            contentColor = CustomTheme.colors.onBackground,
            content = content,
            elevation = 8.dp
        )
    }
}
Screenshot 2022-07-15 at 14 18 59