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:
parent
8ca7b58a92
commit
b7bfcb74a7
1 changed files with 23 additions and 0 deletions
|
@ -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),
|
||||||
|
)
|
||||||
|
}
|
Loading…
Reference in a new issue