Add 24 dp's of padding to the Greeting text.

This commit is contained in:
Fries 2024-08-05 20:43:07 -07:00
parent 51586cc388
commit 30f9687fc7

View file

@ -14,6 +14,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import gay.fries.greetingcard.ui.theme.GreetingCardTheme
class MainActivity : ComponentActivity() {
@ -38,7 +39,7 @@ fun Greeting(name: String, modifier: Modifier = Modifier) {
Surface(color = Color.Magenta) {
Text(
text = "Hello $name!",
modifier = modifier
modifier = modifier.padding(24.dp)
)
}
}