Share login-required content; use shared composable in Android dialog
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user