diff --git a/app/src/main/java/eu/steffo/twom/composables/errorhandling/ErrorText.kt b/app/src/main/java/eu/steffo/twom/composables/errorhandling/ErrorText.kt index 9cc9a5c..08d921f 100644 --- a/app/src/main/java/eu/steffo/twom/composables/errorhandling/ErrorText.kt +++ b/app/src/main/java/eu/steffo/twom/composables/errorhandling/ErrorText.kt @@ -1,10 +1,12 @@ package eu.steffo.twom.composables.errorhandling +import androidx.compose.material3.LocalTextStyle import androidx.compose.material3.MaterialTheme 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.text.TextStyle import androidx.compose.ui.tooling.preview.Preview import eu.steffo.twom.R @@ -14,10 +16,12 @@ import eu.steffo.twom.R fun ErrorText( modifier: Modifier = Modifier, text: String? = null, + style: TextStyle = LocalTextStyle.current ) { Text( modifier = modifier, text = text ?: stringResource(R.string.error), color = MaterialTheme.colorScheme.error, + style = style, ) } 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 index dd93385..60e5d0b 100644 --- a/app/src/main/java/eu/steffo/twom/composables/errorhandling/LoadingText.kt +++ b/app/src/main/java/eu/steffo/twom/composables/errorhandling/LoadingText.kt @@ -1,10 +1,12 @@ package eu.steffo.twom.composables.errorhandling import androidx.compose.material3.LocalContentColor +import androidx.compose.material3.LocalTextStyle 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.text.TextStyle import androidx.compose.ui.tooling.preview.Preview import eu.steffo.twom.R @@ -14,10 +16,12 @@ import eu.steffo.twom.R fun LoadingText( modifier: Modifier = Modifier, text: String? = null, + style: TextStyle = LocalTextStyle.current, ) { Text( modifier = modifier, text = text ?: stringResource(R.string.loading), color = LocalContentColor.current.copy(0.4f), + style = style, ) }