File tree Expand file tree Collapse file tree
richtext-ui/src/commonMain/kotlin/com/halilibo/richtext/ui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,12 +11,15 @@ import androidx.compose.ui.Modifier
1111import androidx.compose.ui.graphics.Color
1212import androidx.compose.ui.graphics.takeOrElse
1313import androidx.compose.ui.platform.LocalLayoutDirection
14+ import androidx.compose.ui.semantics.heading
15+ import androidx.compose.ui.semantics.semantics
1416import androidx.compose.ui.text.TextStyle
1517import androidx.compose.ui.text.font.FontStyle.Companion.Italic
1618import androidx.compose.ui.text.font.FontWeight
1719import androidx.compose.ui.text.resolveDefaults
1820import androidx.compose.ui.unit.sp
1921
22+
2023/* *
2124 * Function that computes the [TextStyle] for the given header level, given the current [TextStyle]
2225 * for this point in the composition. Note that the [TextStyle] passed into this function will be
@@ -70,7 +73,7 @@ internal val DefaultHeadingStyle: HeadingStyle = { level, textStyle ->
7073 text : String
7174) {
7275 Heading (level) {
73- Text (text)
76+ Text (text, Modifier .semantics { heading() } )
7477 }
7578}
7679
You can’t perform that action at this time.
0 commit comments