File tree Expand file tree Collapse file tree
core/designsystem/src/main/java/com/terning/core/designsystem/component/topappbar
feature/intern/src/main/java/com/terning/feature/intern Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,13 +22,14 @@ import com.terning.core.designsystem.theme.White
2222@OptIn(ExperimentalMaterial3Api ::class )
2323@Composable
2424fun TerningBasicTopAppBar (
25+ modifier : Modifier = Modifier ,
2526 title : String = "",
26- modifier : Modifier ,
2727 showBackButton : Boolean = false,
2828 actions : List <@Composable () -> Unit > = emptyList(),
2929 onBackButtonClick : () -> Unit = {},
3030) {
3131 CenterAlignedTopAppBar (
32+ modifier = modifier,
3233 title = {
3334 Text (
3435 text = title,
@@ -46,7 +47,7 @@ fun TerningBasicTopAppBar(
4647 Icon (
4748 painter = painterResource(id = R .drawable.ic_back),
4849 contentDescription = stringResource(id = R .string.ic_back),
49- modifier = modifier
50+ modifier = Modifier
5051 .padding(start = 8 .dp)
5152 .noRippleClickable { onBackButtonClick() }
5253 )
@@ -56,7 +57,7 @@ fun TerningBasicTopAppBar(
5657 }
5758 },
5859 actions = {
59- actions.drop( 1 ). forEach { action ->
60+ actions.forEach { action ->
6061 action()
6162 }
6263 },
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import androidx.compose.foundation.layout.statusBarsPadding
1212import androidx.compose.foundation.lazy.LazyColumn
1313import androidx.compose.foundation.text.selection.SelectionContainer
1414import androidx.compose.material3.Icon
15- import androidx.compose.material3.IconButton
1615import androidx.compose.material3.Text
1716import androidx.compose.runtime.Composable
1817import androidx.compose.runtime.LaunchedEffect
@@ -174,24 +173,17 @@ fun InternScreen(
174173 onBackButtonClick = {
175174 navController.popBackStack()
176175 },
177- actions = listOf (
178- {},
179- {
180- IconButton (
181- onClick = onClickShareButton
182- ) {
183- Icon (
184- painter = painterResource(id = R .drawable.ic_share_32),
185- contentDescription = null ,
186- modifier = Modifier
187- .padding(end = 8 .dp)
188- .noRippleClickable {
189- onClickShareButton()
190- }
176+ actions = listOf {
177+ Icon (
178+ painter = painterResource(id = R .drawable.ic_share_32),
179+ contentDescription = null ,
180+ modifier = Modifier
181+ .padding(end = 8 .dp)
182+ .noRippleClickable(
183+ onClick = onClickShareButton
191184 )
192- }
193- }
194- )
185+ )
186+ }
195187 )
196188
197189 LazyColumn (
You can’t perform that action at this time.
0 commit comments