Skip to content

Commit

Permalink
make linter happy
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Morgillo <[email protected]>
  • Loading branch information
hamen committed Jan 14, 2025
1 parent 838b93a commit 0278383
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
@@ -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<String> = emptySet(),
val windows: Set<String> = emptySet(),
val linux: Set<String> = emptySet(),
@GenerateDataFunctions
public class KeyBinding(
public val macOs: Set<String> = emptySet(),
public val windows: Set<String> = emptySet(),
public val linux: Set<String> = emptySet(),
)

public fun KeyBinding.forCurrentOs(): Set<String> =
Expand All @@ -17,9 +19,10 @@ public fun KeyBinding.forCurrentOs(): Set<String> =
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,
)

0 comments on commit 0278383

Please sign in to comment.