Skip to content

Commit dd35520

Browse files
committed
feat: update CustomTabRowWithSpacing.kt to be generic
1 parent ac18980 commit dd35520

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

app/src/main/java/to/bitkit/ui/screens/wallets/activity/components/CustomTabRowWithSpacing.kt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,17 @@ import androidx.compose.ui.unit.dp
2525
import to.bitkit.ui.components.CaptionB
2626
import to.bitkit.ui.theme.Colors
2727

28+
interface TabItem {
29+
val name: String
30+
val uiText: String
31+
@Composable get
32+
}
33+
2834
@Composable
29-
fun CustomTabRowWithSpacing(
30-
tabs: List<ActivityTab>,
35+
fun <T : TabItem> CustomTabRowWithSpacing(
36+
tabs: List<T>,
3137
currentTabIndex: Int,
32-
onTabChange: (ActivityTab) -> Unit,
38+
onTabChange: (T) -> Unit,
3339
modifier: Modifier = Modifier,
3440
) {
3541
Column(modifier = modifier) {

0 commit comments

Comments
 (0)