package com.dong.maxhap.demos.material

import androidx.compose.material.Tab
import androidx.compose.material.TabRow
import androidx.compose.material.Text
import androidx.compose.runtime.*

@Composable
internal fun TabSamples() {
    var selectedTab by remember { mutableStateOf(0) }
    val tabs = listOf("Tab1", "Tab2", "Tab3")
    TabRow(selectedTabIndex = selectedTab) {
        tabs.forEachIndexed { index, title ->
            Tab(selected = selectedTab == index, onClick = { selectedTab = index }, text = { Text(title) })
        }
    }
}
