Skip to content

Instantly share code, notes, and snippets.

@sliskiCode
Last active August 16, 2023 14:31
Show Gist options
  • Save sliskiCode/6752ea5276e72e407ecfb1147caf58a6 to your computer and use it in GitHub Desktop.
Save sliskiCode/6752ea5276e72e407ecfb1147caf58a6 to your computer and use it in GitHub Desktop.
Simple @Preview usage
import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
@Composable
fun Widget(name: String) {
// UI code...
}
@Preview
@Composable
fun WidgetPreview() {
Widget(name = "Test")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment