diff --git a/samples/showcase/src/main/kotlin/org/jetbrains/jewel/samples/showcase/views/ComponentsView.kt b/samples/showcase/src/main/kotlin/org/jetbrains/jewel/samples/showcase/views/ComponentsView.kt index a6d66441e..8b208086f 100644 --- a/samples/showcase/src/main/kotlin/org/jetbrains/jewel/samples/showcase/views/ComponentsView.kt +++ b/samples/showcase/src/main/kotlin/org/jetbrains/jewel/samples/showcase/views/ComponentsView.kt @@ -58,8 +58,7 @@ public fun ComponentsToolBar(viewModel: ComponentsViewModel) { } } -@Composable -public fun ComponentView(view: ViewInfo) { +@Composable internal fun ComponentView(view: ViewInfo) { Column(Modifier.fillMaxSize().padding(24.dp), verticalArrangement = Arrangement.spacedBy(24.dp)) { Text(view.title, style = Typography.h1TextStyle()) view.content() diff --git a/samples/showcase/src/main/kotlin/org/jetbrains/jewel/samples/showcase/views/ViewInfo.kt b/samples/showcase/src/main/kotlin/org/jetbrains/jewel/samples/showcase/views/ViewInfo.kt index d5b24ff52..34d0f3fab 100644 --- a/samples/showcase/src/main/kotlin/org/jetbrains/jewel/samples/showcase/views/ViewInfo.kt +++ b/samples/showcase/src/main/kotlin/org/jetbrains/jewel/samples/showcase/views/ViewInfo.kt @@ -1,13 +1,15 @@ package org.jetbrains.jewel.samples.showcase.views import androidx.compose.runtime.Composable +import org.jetbrains.jewel.foundation.GenerateDataFunctions import org.jetbrains.jewel.ui.icon.IconKey import org.jetbrains.skiko.hostOs -public data class KeyBinding( - val macOs: Set = emptySet(), - val windows: Set = emptySet(), - val linux: Set = emptySet(), +@GenerateDataFunctions +public class KeyBinding( + public val macOs: Set = emptySet(), + public val windows: Set = emptySet(), + public val linux: Set = emptySet(), ) public fun KeyBinding.forCurrentOs(): Set = @@ -17,9 +19,10 @@ public fun KeyBinding.forCurrentOs(): Set = else -> windows } -public data class ViewInfo( - val title: String, - val iconKey: IconKey, - val keyboardShortcut: KeyBinding? = null, - val content: @Composable () -> Unit, +@GenerateDataFunctions +public class ViewInfo( + public val title: String, + public val iconKey: IconKey, + public val keyboardShortcut: KeyBinding? = null, + public val content: @Composable () -> Unit, )