You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tasks/app/src/main/java/org/tasks/compose/DialogRow.kt

26 lines
840 B
Kotlin

package org.tasks.compose
import androidx.annotation.StringRes
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
@Composable
fun DialogRow(@StringRes text: Int, onClick: () -> Unit) {
Text(
text = stringResource(id = text),
modifier = Modifier
.clickable { onClick() }
.fillMaxWidth()
.padding(horizontal = 16.dp, vertical = 12.dp),
color = MaterialTheme.colors.onSurface,
style = MaterialTheme.typography.body1,
)
}