Last active
June 26, 2021 03:51
-
-
Save sergenes/4918b8e818e3b30325ddb6ae304fe0eb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
val cardWidth = 350.dp | |
val cardHeight = 380.dp | |
const val paddingOffset = 32f | |
const val LOREM_IPSUM_FRONT = "Lorem ipsum dolor sit amet, consectetur adipiscing elit." | |
const val LOREM_IPSUM_BACK = | |
"Integer dolor nisl, finibus eget dignissim sit amet, semper vel ipsum." | |
@Preview | |
@Composable | |
fun TestStudyCardFrontView() { | |
StudyCardView( | |
backgroundColor = primaryColor, | |
side = CardFlipState.FRONT_FACE, | |
modifier = Modifier.size(cardWidth, cardHeight), | |
content = { frontSideColor -> | |
StudyCardsContent( | |
LOREM_IPSUM_FRONT, | |
frontSideColor | |
) | |
}, | |
bottomBar = { frontSideColor -> | |
StudyCardsBottomBar( | |
0, 1, CardFlipState.FRONT_FACE, frontSideColor, | |
leftActionHandler = { }, | |
rightActionHandler = { } | |
) | |
} | |
) | |
} | |
@Preview | |
@Composable | |
fun TestStudyCardBackView() { | |
StudyCardView( | |
backgroundColor = primaryColor, | |
side = CardFlipState.BACK_FACE, | |
modifier = Modifier.size(cardWidth, cardHeight), | |
content = { frontSideColor -> | |
StudyCardsContent(LOREM_IPSUM_BACK, frontSideColor) | |
}, | |
bottomBar = { frontSideColor -> | |
StudyCardsBottomBar( | |
index = 0, count = 1, CardFlipState.BACK_FACE, frontSideColor, | |
leftActionHandler = { }, | |
rightActionHandler = { } | |
) | |
} | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment