in hot-reload-devtools/src/main/kotlin/org/jetbrains/compose/devtools/sidecar/DtRuntimeErrorStatusItem.kt [30:62]
fun DtRuntimeErrorStatusItem() {
val error = ErrorUIState.composeValue()
val controller = LocalDtNotificationsWindowController.current
error.errors.forEach { error ->
DtSidecarStatusItem(
symbol = {
DtImage(
DtImages.Image.WARNING_ICON,
modifier = Modifier.tag(Tag.RuntimeErrorSymbol)
)
},
content = {
Row(verticalAlignment = Alignment.CenterVertically) {
DtText("Runtime exception: ")
DtText(
"${error.value.title} (${error.value.message})",
modifier = Modifier.tag(Tag.RuntimeErrorText)
.pointerHoverIcon(PointerIcon.Hand)
.clickable(role = Role.Button) { controller.requestFocus() }
.widthIn(max = 250.dp),
maxLines = 1,
overflow = TextOverflow.Ellipsis,
style = DtTextStyles.code.copy(
textDecoration = TextDecoration.Underline,
)
)
}
}
)
}
}