Skip to content

Commit

Permalink
fix: deprecated 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
easyhz committed Aug 9, 2024
1 parent 19eac7b commit 52143d4
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.foundation.selection.selectableGroup
import androidx.compose.material.TabRowDefaults.IndicatorHeight
import androidx.compose.material3.Divider
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.ScrollableTabRow
import androidx.compose.material3.Surface
import androidx.compose.material3.Tab
import androidx.compose.material3.TabRow
import androidx.compose.material3.TabRowDefaults
import androidx.compose.material3.TabRowDefaults.primaryContainerColor
import androidx.compose.material3.TabRowDefaults.primaryContentColor
import androidx.compose.material3.TabRowDefaults.tabIndicatorOffset
import androidx.compose.material3.VerticalDivider
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Immutable
import androidx.compose.runtime.getValue
Expand Down Expand Up @@ -65,18 +68,18 @@ import kotlinx.coroutines.launch
fun TabRow(
selectedTabIndex: Int,
modifier: Modifier = Modifier,
containerColor: Color = TabRowDefaults.containerColor,
contentColor: Color = TabRowDefaults.contentColor,
containerColor: Color = primaryContainerColor,
contentColor: Color = primaryContentColor,
tabSpacing: Dp = 8.dp,
indicator: @Composable (tabPositions: List<TabPosition>) -> Unit = @Composable { tabPositions ->
if (selectedTabIndex < tabPositions.size) {
TabRowDefaults.Indicator(
TabRowDefaults.SecondaryIndicator(
Modifier.tabIndicatorOffset(tabPositions[selectedTabIndex])
)
}
},
divider: @Composable () -> Unit = @Composable {
Divider()
VerticalDivider()
},
tabs: @Composable () -> Unit
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,10 @@ fun <T> HomeTopBar(
contentColor = Grey400,
divider = { },
indicator = { tabPositions ->
TabRowDefaults.Indicator(
modifier = Modifier
.height(3.dp)
.tabIndicatorOffset(tabPositions[selectedIndex.intValue]),
color = Green500
TabRowDefaults.SecondaryIndicator(
Modifier.tabIndicatorOffset(tabPositions[selectedIndex.intValue]),
color = Green500,
height = 3.dp
)
},
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Divider
import androidx.compose.material.Icon
import androidx.compose.material.Text
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -57,10 +57,10 @@ internal fun RemindItem(
)
}
}
Divider(
HorizontalDivider(
modifier = Modifier.padding(vertical = 4.dp),
color = Grey200,
thickness = 1.dp
thickness = 1.dp,
color = Grey200
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Divider
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
Expand Down Expand Up @@ -145,9 +145,11 @@ private fun TermsCheck(
)
}
}
Divider(modifier = Modifier
.fillMaxWidth()
.padding(bottom = 17.dp), color = Grey100, thickness = 1.dp)
HorizontalDivider(
modifier = Modifier
.fillMaxWidth()
.padding(bottom = 17.dp), thickness = 1.dp, color = Grey100
)
Terms.entries.forEach { terms ->
TermsItem(
modifier = Modifier
Expand Down

0 comments on commit 52143d4

Please sign in to comment.