Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
class PreviewLabGalleryState(initialSelectedPreview: Pair<String, PreviewLabPreview>? = null)

State holder for PreviewLabGallery.

Link copied to clipboard
class SelectedPreview(val groupName: String, val preview: PreviewLabPreview, val title: String = preview.displayName)

Properties

Link copied to clipboard
const val AllGroupName: String

The default group name used for showing all previews in the PreviewLabGallery. This group contains all previews regardless of their featured file categorization.

Functions

Link copied to clipboard
inline fun PreviewLabGalleryNavigator?.navigateOr(id: String, fallback: () -> Unit)
Link copied to clipboard
fun PreviewLabGallery(previewList: List<PreviewLabPreview>, modifier: Modifier = Modifier, state: PreviewLabGalleryState = remember { PreviewLabGalleryState() }, openFileHandler: OpenFileHandler<out Any?>? = null, featuredFileList: Map<String, List<String>> = emptyMap(), noSelectedContents: @Composable (Map<String, List<PreviewLabPreview>>) -> Unit = { groupedPreviews -> PreviewListGrid( groupedPreviewList = groupedPreviews, onPreviewClick = { group, preview -> state.select(group, preview) }, contentPadding = PaddingValues(adaptive(12.dp, 20.dp)), ) })

A Composable function that catalogs and displays a list of Previews. The left sidebar actually displays the list of Previews, and the selected Preview is displayed in the center of the screen.

Link copied to clipboard
fun PreviewListGrid(groupedPreviewList: Map<String, List<PreviewLabPreview>>, onPreviewClick: (String, PreviewLabPreview) -> Unit, contentPadding: PaddingValues = PaddingValues.Zero)
Link copied to clipboard