Skip to content

Commit

Permalink
feat: TopAppBar에 공유 버튼 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
kang9366 committed Mar 27, 2024
1 parent 8601f26 commit 6266cda
Showing 1 changed file with 26 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.Divider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
Expand Down Expand Up @@ -75,11 +77,9 @@ fun DetailScreen(

Scaffold(
topBar = {
ConnectDogTopAppBar(
titleRes = null,
navigationType = TopAppBarNavigationType.BACK,
navigationIconContentDescription = "Navigation icon",
onNavigationClick = onBackClick
DetailTopAppBar(
onBackClick = onBackClick,
onShareClick = {}
)
},
bottomBar = {
Expand Down Expand Up @@ -114,6 +114,27 @@ fun DetailScreen(
}
}

@Composable
private fun DetailTopAppBar(
onBackClick: () -> Unit,
onShareClick: () -> Unit
) {
ConnectDogTopAppBar(
titleRes = null,
navigationType = TopAppBarNavigationType.BACK,
navigationIconContentDescription = "Navigation icon home",
onNavigationClick = onBackClick,
actionButtons = {
IconButton(onClick = onShareClick) {
Icon(
painter = painterResource(id = R.drawable.ic_share),
contentDescription = "Navigate to Search"
)
}
}
)
}

@Composable
fun BookmarkButton(
isBookmark: Boolean,
Expand Down

0 comments on commit 6266cda

Please sign in to comment.