Add 24 dp's of padding to the Greeting text.
This commit is contained in:
parent
51586cc388
commit
30f9687fc7
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue