Share Nearby dialog container and fix night-mode text in detail dialogs
- New: shared/ui/NearbyDialogContent.kt (material-free container for dialog body) - Android: use NearbyDialogContent in NearbyDialog; keep AlertDialog shell only - Fix: pass MaterialTheme colors to Wiki/Fornsok/DM detail contents (title/body/caption) so text follows light/dark mode
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package app.klottr.ui
|
||||
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.heightIn
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
||||
/**
|
||||
* Material-fri container för Närliggande-dialogens innehåll.
|
||||
* Android skickar in maxhöjd och själva innehållet som en slot.
|
||||
*/
|
||||
@Composable
|
||||
fun NearbyDialogContent(
|
||||
maxHeight: Dp,
|
||||
content: @Composable () -> Unit
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.heightIn(min = 360.dp, max = maxHeight) // Samma höjdlogik som tidigare
|
||||
) {
|
||||
content()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user