Skip to content

Commit 89dcf0a

Browse files
committed
Display syntax signatures within a CodeExampleBox on the detail screen for improved readability.
1 parent f10c0f9 commit 89dcf0a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
- [ ] Assign unique IDs to objects and enforce consistent ordering logic
2828
- [ ] Correct usage of visibility modifiers across the codebase
2929
- [ ] Introduce common `@Preview` annotations for reusable Composable previews
30-
- [ ] Add inline code formatting support for syntax display on the `Detail Screen`
30+
- [x] Add code block for syntax display on the `Detail Screen`
3131
- [ ] Implement caching on the `Detail Screen` to store previously viewed topic data
3232
- [ ] Implement dynamic topic loading in `TopicRepository` to support scalability
3333
- [ ] Integrate Room database to persist bookmark states

composeApp/src/commonMain/kotlin/com/developersbreach/kotlindictionarymultiplatform/ui/screens/detail/DetailScreenComponents.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package com.developersbreach.kotlindictionarymultiplatform.ui.screens.detail
33
import androidx.compose.foundation.clickable
44
import androidx.compose.foundation.layout.Spacer
55
import androidx.compose.foundation.layout.height
6+
import androidx.compose.foundation.layout.padding
67
import androidx.compose.material3.MaterialTheme
78
import androidx.compose.runtime.Composable
89
import androidx.compose.ui.Modifier
@@ -63,10 +64,9 @@ fun SyntaxSection(
6364
color = MaterialTheme.colorScheme.onPrimary,
6465
)
6566
Spacer(Modifier.height(4.dp))
66-
KdText(
67-
modifier = Modifier,
68-
text = syntax.signature,
69-
style = MaterialTheme.typography.bodyMedium,
67+
CodeExampleBox(
68+
code = syntax.signature,
69+
modifier = Modifier.padding(bottom = 8.dp),
7070
)
7171
syntax.notes?.let {
7272
Spacer(Modifier.height(4.dp))

0 commit comments

Comments
 (0)