Skip to content

Commit

Permalink
Merge pull request #211 from tarkalabs/mahi/enhance/TUITextRow
Browse files Browse the repository at this point in the history
Code Optimised in TUITextRow
  • Loading branch information
rajajawahar authored Mar 5, 2024
2 parents aca4c2e + 7e2742e commit 6426e1e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tarka-ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ publishing {
run {
groupId = "com.tarkalabs"
artifactId = getLibraryArtifactId()
version = "1.1.5"
version = "1.1.6"
artifact("$buildDir/outputs/aar/tarka-ui-release.aar")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,16 @@ import com.tarkalabs.tarkaui.theme.TUITheme
contentDescription = infoIcon.contentDescription,
tint = TUITheme.colors.utilityOutline,
modifier = Modifier
.then(if (onInfoIconClick == null) Modifier else Modifier.clickable(onClick = {
if (menuItemList.isNullOrEmpty()) {
onInfoIconClick()
} else {
expanded = expanded.not()
}
}))
.then(
if (onInfoIconClick == null && menuItemList.isNullOrEmpty()) Modifier else Modifier.clickable(
onClick = {
if (!menuItemList.isNullOrEmpty()) {
expanded = !expanded
} else {
onInfoIconClick?.invoke()
}
})
)
.height(40.dp)
.width(24.dp)
.testTag(tags.infoIconTag)
Expand Down

0 comments on commit 6426e1e

Please sign in to comment.