diff --git a/app/src/main/java/eu/steffo/twom/composables/errorhandling/LoadingText.kt b/app/src/main/java/eu/steffo/twom/composables/errorhandling/LoadingText.kt new file mode 100644 index 0000000..dd93385 --- /dev/null +++ b/app/src/main/java/eu/steffo/twom/composables/errorhandling/LoadingText.kt @@ -0,0 +1,23 @@ +package eu.steffo.twom.composables.errorhandling + +import androidx.compose.material3.LocalContentColor +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import eu.steffo.twom.R + + +@Composable +@Preview +fun LoadingText( + modifier: Modifier = Modifier, + text: String? = null, +) { + Text( + modifier = modifier, + text = text ?: stringResource(R.string.loading), + color = LocalContentColor.current.copy(0.4f), + ) +}