Skip to content

Commit

Permalink
refactor: 앱 바 actions 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
syb8200 committed Jan 11, 2024
1 parent d45b6d1 commit 06eebc7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,19 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.LinearProgressIndicator
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.StrokeCap
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
import com.susu.core.designsystem.component.appbar.SusuDefaultAppBar
import com.susu.core.designsystem.component.appbar.icon.BackIcon
import com.susu.core.designsystem.component.appbar.icon.NotificationIcon
import com.susu.core.designsystem.component.appbar.icon.SearchIcon
import com.susu.core.designsystem.component.badge.BadgeColor
import com.susu.core.designsystem.component.badge.BadgeStyle
import com.susu.core.designsystem.component.badge.SusuBadge
Expand All @@ -37,7 +36,6 @@ import com.susu.core.designsystem.theme.Gray90
import com.susu.core.designsystem.theme.Orange20
import com.susu.core.designsystem.theme.SusuTheme
import com.susu.core.ui.extension.collectWithLifecycle
import com.susu.core.ui.extension.susuClickable
import com.susu.feature.envelope.component.EnvelopeHistoryItem
import com.susu.feature.sent.R

Expand All @@ -62,8 +60,9 @@ fun SentEnvelopeRoute(
@Composable
fun SentEnvelopeScreen(
modifier: Modifier = Modifier,
clickPadding: Dp = SusuTheme.spacing.spacing_xs,
onClickBackIcon: () -> Unit = {},
onClickSearchIcon: () -> Unit = {},
onClickNotificationIcon: () -> Unit = {},
onClickEnvelopeDetail: () -> Unit = {},
) {
Box(
Expand All @@ -78,26 +77,8 @@ fun SentEnvelopeScreen(
},
title = "김철수",
actions = {
Icon(
painter = painterResource(id = com.susu.core.designsystem.R.drawable.ic_appbar_search),
contentDescription = stringResource(id = com.susu.core.designsystem.R.string.content_description_search_icon),
modifier = modifier
.susuClickable(
rippleEnabled = false,
onClick = {},
)
.padding(clickPadding),
)
Icon(
painter = painterResource(id = com.susu.core.designsystem.R.drawable.ic_appbar_notification),
contentDescription = stringResource(id = com.susu.core.designsystem.R.string.content_description_notification_icon),
modifier = modifier
.susuClickable(
rippleEnabled = false,
onClick = {},
)
.padding(clickPadding),
)
SearchIcon(onClickSearchIcon)
NotificationIcon(onClickNotificationIcon)
},
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.hilt.navigation.compose.hiltViewModel
import com.susu.core.designsystem.component.appbar.SusuDefaultAppBar
import com.susu.core.designsystem.component.appbar.icon.BackIcon
import com.susu.core.designsystem.component.appbar.icon.DeleteText
import com.susu.core.designsystem.component.appbar.icon.EditText
import com.susu.core.designsystem.theme.Gray100
import com.susu.core.designsystem.theme.SusuTheme
import com.susu.core.ui.extension.collectWithLifecycle
import com.susu.core.ui.extension.susuClickable
import com.susu.feature.envelopedetail.component.DetailItem

@Composable
Expand All @@ -43,7 +43,8 @@ fun SentEnvelopeDetailRoute(
fun SentEnvelopeDetailScreen(
modifier: Modifier = Modifier,
onClickBackIcon: () -> Unit = {},

onClickEdit: () -> Unit = {},
onClickDelete: () -> Unit = {},
) {
val scrollState = rememberScrollState()

Expand All @@ -59,26 +60,12 @@ fun SentEnvelopeDetailScreen(
)
},
actions = {
Text(
text = stringResource(id = com.susu.core.ui.R.string.word_edit),
style = SusuTheme.typography.title_xxs,
color = Gray100,
modifier = modifier
.susuClickable(
rippleEnabled = false,
onClick = {},
),
EditText(
onClick = onClickEdit,
)
Spacer(modifier = modifier.size(SusuTheme.spacing.spacing_m))
Text(
text = stringResource(id = com.susu.core.ui.R.string.word_delete),
style = SusuTheme.typography.title_xxs,
color = Gray100,
modifier = modifier
.susuClickable(
rippleEnabled = false,
onClick = {},
),
DeleteText(
onClick = onClickDelete,
)
Spacer(modifier = modifier.size(SusuTheme.spacing.spacing_m))
},
Expand Down

0 comments on commit 06eebc7

Please sign in to comment.