-
Notifications
You must be signed in to change notification settings - Fork 0
[refactor#262] 탑바 리팩토링 #284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f81f87a
#262 [feat] : 공통 탑바 구현
sohee6989 70b133f
#262 [chore] : 공통 탑바 수정
sohee6989 105eefb
#262 [feat] : BackTopbar/CloseTopbar 구현
sohee6989 a6e8660
#262 [chore] : 탑바 컴포넌트 사용하는 것으로 변경
sohee6989 43b046a
Merge branch 'develop' of https://github.com/36-APPJAM-HEARTZ/ByeBoo-…
sohee6989 1f14c48
#262 [feat]: ByeBooTabar를 이용한 탑바 구현
sohee6989 583892e
#262 [refactor]: 만들어둔 탑바 사용하는 방식으로 리팩토링
sohee6989 b3aba03
#262 [chore]: ktlint 체크
sohee6989 29a8fae
#262 [chore]: 오프보딩 - 퀘스트 다시보기 화면 수정사항 변경
sohee6989 52db1e2
#262 [chore]: 코드리뷰 반영
sohee6989 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
app/src/main/java/com/byeboo/app/core/designsystem/component/topbar/BackTopbar.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| package com.byeboo.app.core.designsystem.component.topbar | ||
|
|
||
| import androidx.compose.material3.Icon | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.graphics.Color | ||
| import androidx.compose.ui.graphics.vector.ImageVector | ||
| import androidx.compose.ui.res.vectorResource | ||
| import androidx.compose.ui.text.TextStyle | ||
| import com.byeboo.app.R | ||
| import com.byeboo.app.core.designsystem.ui.theme.ByeBooTheme | ||
| import com.byeboo.app.core.util.noRippleClickable | ||
|
|
||
| @Composable | ||
| fun BackTopbar( | ||
| onBackClick: () -> Unit, | ||
| modifier: Modifier = Modifier, | ||
| title: String? = null, | ||
| textColor: Color = ByeBooTheme.colors.white, | ||
| textStyle: TextStyle = ByeBooTheme.typography.sub1, | ||
| ) { | ||
| ByeBooTopbar( | ||
| title = title, | ||
| textColor = textColor, | ||
| textStyle = textStyle, | ||
| navigationIcon = { | ||
| Icon( | ||
| imageVector = ImageVector.vectorResource(id = R.drawable.ic_left), | ||
| contentDescription = null, | ||
| tint = ByeBooTheme.colors.gray50, | ||
| modifier = | ||
| Modifier | ||
| .noRippleClickable(onClick = onBackClick), | ||
| ) | ||
| }, | ||
| modifier = modifier, | ||
| ) | ||
| } |
58 changes: 58 additions & 0 deletions
58
app/src/main/java/com/byeboo/app/core/designsystem/component/topbar/ByeBooTopbar.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| package com.byeboo.app.core.designsystem.component.topbar | ||
|
|
||
| import androidx.compose.foundation.background | ||
| import androidx.compose.foundation.layout.Box | ||
| import androidx.compose.foundation.layout.Row | ||
| import androidx.compose.foundation.layout.fillMaxWidth | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.material3.Text | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Alignment | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.graphics.Color | ||
| import androidx.compose.ui.text.TextStyle | ||
| import androidx.compose.ui.unit.dp | ||
| import com.byeboo.app.core.designsystem.ui.theme.ByeBooTheme | ||
| import com.byeboo.app.core.util.screenHeightDp | ||
|
|
||
| @Composable | ||
| fun ByeBooTopbar( | ||
| modifier: Modifier = Modifier, | ||
| title: String? = null, | ||
| textColor: Color = ByeBooTheme.colors.gray50, | ||
| textStyle: TextStyle = ByeBooTheme.typography.sub1, | ||
| navigationIcon: @Composable () -> Unit = {}, | ||
| actions: @Composable () -> Unit = {}, | ||
| backgroundColor: Color = ByeBooTheme.colors.background, | ||
| ) { | ||
| Box( | ||
| modifier = | ||
| modifier | ||
| .fillMaxWidth() | ||
| .background(backgroundColor) | ||
| .padding(bottom = screenHeightDp(16.dp)), | ||
| ) { | ||
| Row( | ||
| modifier = Modifier.align(Alignment.CenterStart), | ||
| verticalAlignment = Alignment.CenterVertically, | ||
| ) { | ||
| navigationIcon() | ||
| } | ||
|
|
||
| if (title != null) { | ||
| Text( | ||
| modifier = Modifier.align(Alignment.Center), | ||
| text = title, | ||
| color = textColor, | ||
| style = textStyle, | ||
| ) | ||
| } | ||
|
|
||
| Row( | ||
| modifier = Modifier.align(Alignment.CenterEnd), | ||
| verticalAlignment = Alignment.CenterVertically, | ||
| ) { | ||
| actions() | ||
| } | ||
| } | ||
| } |
39 changes: 39 additions & 0 deletions
39
app/src/main/java/com/byeboo/app/core/designsystem/component/topbar/CloseTopbar.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| package com.byeboo.app.core.designsystem.component.topbar | ||
|
|
||
| import androidx.compose.material3.Icon | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.graphics.Color | ||
| import androidx.compose.ui.graphics.vector.ImageVector | ||
| import androidx.compose.ui.res.vectorResource | ||
| import androidx.compose.ui.text.TextStyle | ||
| import com.byeboo.app.R | ||
| import com.byeboo.app.core.designsystem.ui.theme.ByeBooTheme | ||
| import com.byeboo.app.core.util.noRippleClickable | ||
|
|
||
| @Composable | ||
| fun CloseTopbar( | ||
| onCloseClick: () -> Unit, | ||
| modifier: Modifier = Modifier, | ||
| title: String? = null, | ||
| textColor: Color = ByeBooTheme.colors.white, | ||
| textStyle: TextStyle = ByeBooTheme.typography.sub1, | ||
| ) { | ||
| ByeBooTopbar( | ||
| title = title, | ||
| textColor = textColor, | ||
| textStyle = textStyle, | ||
| actions = { | ||
| Icon( | ||
| imageVector = ImageVector.vectorResource(id = R.drawable.ic_cancel), | ||
| contentDescription = null, | ||
| tint = ByeBooTheme.colors.white, | ||
| modifier = | ||
| Modifier.noRippleClickable( | ||
| onClick = onCloseClick, | ||
| ), | ||
| ) | ||
| }, | ||
| modifier = modifier, | ||
| ) | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.