shared(ui): make SharedInfoCard accept TextStyle for dark mode; keep foundation-only (no material deps)
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user