feat(sectionheader): update header color and button text color for improved visibility

This commit is contained in:
2026-05-02 19:48:21 +02:00
parent 1a2687f1a2
commit a0b573cbfe

View File

@@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.width
import androidx.compose.material.icons.Icons import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.ArrowForward import androidx.compose.material.icons.automirrored.outlined.ArrowForward
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.Icon import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text import androidx.compose.material3.Text
@@ -26,6 +27,8 @@ fun SectionHeader(
modifier: Modifier = Modifier, modifier: Modifier = Modifier,
onActionClick: () -> Unit = {} onActionClick: () -> Unit = {}
) { ) {
val headerColor = MaterialTheme.colorScheme.onSurface
Row( Row(
modifier = modifier modifier = modifier
.fillMaxWidth() .fillMaxWidth()
@@ -36,10 +39,14 @@ fun SectionHeader(
Text( Text(
text = title, text = title,
style = MaterialTheme.typography.titleLarge, style = MaterialTheme.typography.titleLarge,
fontWeight = FontWeight.Bold fontWeight = FontWeight.Bold,
color = headerColor
) )
if (actionLabel != null) { if (actionLabel != null) {
TextButton(onClick = onActionClick) { TextButton(
onClick = onActionClick,
colors = ButtonDefaults.textButtonColors(contentColor = headerColor)
) {
Text(text = actionLabel) Text(text = actionLabel)
Spacer(modifier = Modifier.width(4.dp)) Spacer(modifier = Modifier.width(4.dp))
Icon( Icon(