android: restore the shared LabelChip the search-icon replay deleted

Replaying b808158 removed ui/components/LabelChip.kt: that commit predates
e2147b0, which extracted one shared LabelChip for the chat panes, so the older
diff carried the file's deletion. Restored from the commit before the replay; the
build and the full unit suite pass again. A cherry-pick's deletions need the same
scrutiny as its conflicts.
This commit is contained in:
2026-10-18 00:13:17 +01:00
parent 986a62b09f
commit 2c1dfe9a35
@@ -0,0 +1,31 @@
package net.awan.pipelines.ui.components
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.Dp
/**
* A small rounded tonal chip whose label carries its meaning, so it never relies
* on colour alone. One shape, colour and type across the app; a caller passes
* only the padding its context needs (the search row's type badge is tighter than
* the stage-type chip), so a second copy of the chip never appears.
*/
@Composable
internal fun LabelChip(label: String, horizontalPadding: Dp, verticalPadding: Dp) {
Surface(
shape = RoundedCornerShape(50),
color = MaterialTheme.colorScheme.secondaryContainer,
) {
Text(
text = label,
style = MaterialTheme.typography.labelMedium,
color = MaterialTheme.colorScheme.onSecondaryContainer,
modifier = Modifier.padding(horizontal = horizontalPadding, vertical = verticalPadding),
)
}
}