Skip to content

Instantly share code, notes, and snippets.

@KatieBarnett
Created May 10, 2023 05:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KatieBarnett/8ce5af95504ac8d6c5df6861d747d162 to your computer and use it in GitHub Desktop.
Save KatieBarnett/8ce5af95504ac8d6c5df6861d747d162 to your computer and use it in GitHub Desktop.
Preview with composable preview parameter
@Preview
@Composable
fun TextColoredComponentPreview(
@PreviewParameter(TextWithColorConfigProvider::class) data: TextData
) {
MaterialTheme {
Text(data.value().text, color = data.value().color)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment