Share login-required content; use shared composable in Android dialog

This commit is contained in:
2025-09-18 23:29:19 +02:00
parent 9da472fd2d
commit 793419893a
2 changed files with 43 additions and 5 deletions

View File

@@ -0,0 +1,32 @@
package app.klottr.ui
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.text.BasicText
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.unit.dp
/**
* Material-fri textkropp för "inloggning krävs".
* Android/iOS sätter färg/typografi via textStyle.
*/
@Composable
fun LoginRequiredContent(
message: String,
textStyle: TextStyle,
noteLines: List<String> = emptyList()
) {
Column {
BasicText(message, style = textStyle)
if (noteLines.isNotEmpty()) {
Spacer(Modifier.height(8.dp))
noteLines.forEachIndexed { i, s ->
if (i > 0) Spacer(Modifier.height(4.dp))
BasicText(s, style = textStyle)
}
}
}
}