From 52143d4c5be5165bc5a235533b414bf11de24243 Mon Sep 17 00:00:00 2001 From: easyhz Date: Fri, 9 Aug 2024 16:57:31 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20deprecated=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/design_system/component/tab/TabRow.kt | 13 ++++++++----- .../core/design_system/component/topBar/TopBar.kt | 9 ++++----- .../component/creation/remind/RemindItem.kt | 12 ++++++------ .../feature/sign/component/signUp/TermsView.kt | 10 ++++++---- 4 files changed, 24 insertions(+), 20 deletions(-) diff --git a/core/design-system/src/main/java/com/easyhz/noffice/core/design_system/component/tab/TabRow.kt b/core/design-system/src/main/java/com/easyhz/noffice/core/design_system/component/tab/TabRow.kt index 75672a96..cc93706a 100644 --- a/core/design-system/src/main/java/com/easyhz/noffice/core/design_system/component/tab/TabRow.kt +++ b/core/design-system/src/main/java/com/easyhz/noffice/core/design_system/component/tab/TabRow.kt @@ -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 @@ -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) -> Unit = @Composable { tabPositions -> if (selectedTabIndex < tabPositions.size) { - TabRowDefaults.Indicator( + TabRowDefaults.SecondaryIndicator( Modifier.tabIndicatorOffset(tabPositions[selectedTabIndex]) ) } }, divider: @Composable () -> Unit = @Composable { - Divider() + VerticalDivider() }, tabs: @Composable () -> Unit ) { diff --git a/core/design-system/src/main/java/com/easyhz/noffice/core/design_system/component/topBar/TopBar.kt b/core/design-system/src/main/java/com/easyhz/noffice/core/design_system/component/topBar/TopBar.kt index f17d692f..2cec56aa 100644 --- a/core/design-system/src/main/java/com/easyhz/noffice/core/design_system/component/topBar/TopBar.kt +++ b/core/design-system/src/main/java/com/easyhz/noffice/core/design_system/component/topBar/TopBar.kt @@ -62,11 +62,10 @@ fun 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 ) }, ) { diff --git a/feature/announcement/src/main/java/com/easyhz/noffice/feature/announcement/component/creation/remind/RemindItem.kt b/feature/announcement/src/main/java/com/easyhz/noffice/feature/announcement/component/creation/remind/RemindItem.kt index 12f53c31..b82a4770 100644 --- a/feature/announcement/src/main/java/com/easyhz/noffice/feature/announcement/component/creation/remind/RemindItem.kt +++ b/feature/announcement/src/main/java/com/easyhz/noffice/feature/announcement/component/creation/remind/RemindItem.kt @@ -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 @@ -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 ) } } \ No newline at end of file diff --git a/feature/sign/src/main/java/com/easyhz/noffice/feature/sign/component/signUp/TermsView.kt b/feature/sign/src/main/java/com/easyhz/noffice/feature/sign/component/signUp/TermsView.kt index 139af894..48e8c7d0 100644 --- a/feature/sign/src/main/java/com/easyhz/noffice/feature/sign/component/signUp/TermsView.kt +++ b/feature/sign/src/main/java/com/easyhz/noffice/feature/sign/component/signUp/TermsView.kt @@ -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 @@ -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