shared(ui): make SharedInfoCard accept TextStyle for dark mode; keep foundation-only (no material deps)

This commit is contained in:
2025-09-12 15:35:05 +02:00
parent a006b9ccb0
commit a315eb6f07
2 changed files with 42 additions and 4 deletions

View File

@@ -12,6 +12,7 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.text.BasicText
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.TextStyle // Vi kan skicka in textstil från anroparen
import androidx.compose.ui.unit.dp
/**
@@ -21,10 +22,12 @@ import androidx.compose.ui.unit.dp
* - Kan anropas från Android nu och från iOS senare.
*/
@Composable
fun SharedInfoCard() {
fun SharedInfoCard(
textStyle: TextStyle = TextStyle.Default // [NY] Fallback: neutral stil; vi skickar in rätt stil från Android
) {
Column(Modifier.padding(12.dp)) {
BasicText("Klottr – delad UI (CMP)")
BasicText("Klottr – delad UI (CMP)", style = textStyle) // [ÄNDRAD] använd inskickad stil
Spacer(Modifier.height(4.dp))
BasicText("Renderas från :shared/commonMain (JetBrains Compose).")
BasicText("Renderas från :shared/commonMain (JetBrains Compose).", style = textStyle) // [ÄNDRAD] använd inskickad stil
}
}
}