Skip to content

Commit

Permalink
Merge pull request #195 from tarkalabs/raja/menuitemchange
Browse files Browse the repository at this point in the history
fix : Position replaced with TUIPopUpMenuItem
  • Loading branch information
rajajawahar authored Feb 20, 2024
2 parents 2a1bbcb + 7be7739 commit 82d9fd0
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ import androidx.compose.ui.platform.testTag
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.tarkalabs.tarkaui.icons.ChevronRight20
import com.tarkalabs.tarkaui.icons.TarkaIcon
import com.tarkalabs.tarkaui.icons.TarkaIcons
import com.tarkalabs.tarkaui.components.TextRowStyle.Title
import com.tarkalabs.tarkaui.components.TextRowStyle.TitleWithDescription
import com.tarkalabs.tarkaui.components.base.IconButtonStyle.GHOST
import com.tarkalabs.tarkaui.components.base.TUIIconButton
import com.tarkalabs.tarkaui.components.base.TUIIconButtonTags
import com.tarkalabs.tarkaui.icons.ChevronRight20
import com.tarkalabs.tarkaui.icons.TarkaIcon
import com.tarkalabs.tarkaui.icons.TarkaIcons
import com.tarkalabs.tarkaui.theme.TUITheme

/**
Expand Down Expand Up @@ -86,7 +86,7 @@ import com.tarkalabs.tarkaui.theme.TUITheme
onInfoIconClick: (() -> Unit)? = {},
onTextRowClick: (() -> Unit)? = null,
menuItemList: List<TUIPopUpMenuItem>? = null,
onMenuItemClick: ((Int) -> Unit)? = null,
onMenuItemClick: ((TUIPopUpMenuItem) -> Unit)? = null,
paddingValues: PaddingValues = PaddingValues(),
tags: TUITextRowTags = TUITextRowTags()
) {
Expand Down Expand Up @@ -162,14 +162,14 @@ import com.tarkalabs.tarkaui.theme.TUITheme
.background(TUITheme.colors.surface)
.align(Alignment.TopEnd),
) {
menuItemList?.forEachIndexed { index, item ->
menuItemList?.forEach { item ->
TUIMobileOverlayMenuItem(
title = item.title,
isSelected = false,
style = MobileOverlayMenuItemStyle.Title,
onMobileOverlayMenuItemClick = {
expanded = false
onMenuItemClick?.invoke(index)
onMenuItemClick?.invoke(item)
},
modifier = Modifier.width(160.dp),
leadingContent = MobileOverlayMenuItemLeadingContentType.Icon(item.icon)
Expand Down

0 comments on commit 82d9fd0

Please sign in to comment.