1
Fork 0
mirror of https://github.com/Steffo99/twom.git synced 2024-11-25 01:24:24 +00:00

Create LoadingText from the skeleton of ErrorText

This commit is contained in:
Steffo 2024-01-17 12:13:24 +01:00
parent 8ca7b58a92
commit b7bfcb74a7
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0

View file

@ -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),
)
}