git.iko.soy/opencode-android
on d518ef7 help sign in
25 lines 909 B history raw
1package soy.iko.opencode.ui.components
3import androidx.compose.foundation.layout.padding
4import androidx.compose.material3.MaterialTheme
5import androidx.compose.material3.Text
6import androidx.compose.runtime.Composable
7import androidx.compose.ui.Modifier
8import androidx.compose.ui.semantics.heading
9import androidx.compose.ui.semantics.semantics
10import androidx.compose.ui.unit.dp
12/**
13 * A primary-tinted section title, marked as an accessibility heading so TalkBack users
14 * can navigate between sections. Shared so section headings look and behave identically
15 * across Settings, Usage, and other grouped screens.
16 */
17@Composable
18fun SectionHeader(text: String, modifier: Modifier = Modifier) {
19 Text(
20 text,
21 style = MaterialTheme.typography.titleSmall,
22 color = MaterialTheme.colorScheme.primary,
23 modifier = modifier.padding(top = 8.dp).semantics { heading() },
24 )