Skip to content

Commit

Permalink
Add PreviewDialogSurface
Browse files Browse the repository at this point in the history
  • Loading branch information
takahirom committed Dec 14, 2024
1 parent c6e8413 commit 0b22865
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ package com.github.takahirom.preview.tests

import android.content.res.Configuration
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.material3.AlertDialog
Expand Down Expand Up @@ -124,6 +126,24 @@ fun PreviewDialog() {
}
}

@Preview
@Composable
fun PreviewDialogSurface() {
MaterialTheme {
Surface {
Box(Modifier.height(300.dp)) {
Text("Hello, World!")
}
AlertDialog(
onDismissRequest = {},
confirmButton = @Composable { Text("Confirm") },
text = @Composable { Text("Generate Preview Test Sample!") }
)
}
}
}


@Preview(
name = "Preview width & height large",
widthDp = 2000,
Expand Down

0 comments on commit 0b22865

Please sign in to comment.