Skip to content

Instantly share code, notes, and snippets.

@sergenes
Last active June 26, 2021 03:51
Show Gist options
  • Save sergenes/4918b8e818e3b30325ddb6ae304fe0eb to your computer and use it in GitHub Desktop.
Save sergenes/4918b8e818e3b30325ddb6ae304fe0eb to your computer and use it in GitHub Desktop.
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