Last active
February 3, 2024 07:04
-
-
Save LDRAlighieri/532025cbccfe32519f0f4844ec40614d to your computer and use it in GitHub Desktop.
Example of Fiberglass screen slots for items
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun spacerItemSlot(): FiberglassLazyItemSlot = { _, item -> | |
Spacer(modifier = Modifier.height((item as SpacerItem).height.dp)) | |
} | |
fun titleItemSlot(): FiberglassLazyItemSlot = { _, item -> | |
Text( | |
text = (item as TitleItem).title, | |
modifier = Modifier.padding(horizontal = AppTheme.dimensions.horizontalGuideline), | |
color = AppTheme.colors.onBackground, | |
style = AppTheme.typography.headlineMedium | |
) | |
} | |
fun loremIpsumSlot(): FiberglassLazyItemSlot = { _, item -> | |
Text( | |
text = (item as LoremIpsumItem).text, | |
modifier = Modifier.padding(horizontal = AppTheme.dimensions.horizontalGuideline), | |
color = AppTheme.colors.onBackground, | |
style = AppTheme.typography.bodyMedium, | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment