diff --git a/core/designsystem/src/main/java/com/wap/designsystem/component/TopBar.kt b/core/designsystem/src/main/java/com/wap/designsystem/component/TopBar.kt index 49f8dc1b..75840918 100644 --- a/core/designsystem/src/main/java/com/wap/designsystem/component/TopBar.kt +++ b/core/designsystem/src/main/java/com/wap/designsystem/component/TopBar.kt @@ -3,8 +3,7 @@ package com.wap.designsystem.component import androidx.annotation.DrawableRes import androidx.annotation.StringRes import androidx.compose.foundation.clickable -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size @@ -35,38 +34,38 @@ fun WappTopBar( @DrawableRes leftButtonDrawableRes: Int = R.drawable.ic_back, @DrawableRes rightButtonDrawableRes: Int = R.drawable.ic_close, ) { - Row( + Box( modifier = modifier, - horizontalArrangement = Arrangement.SpaceBetween, - verticalAlignment = Alignment.CenterVertically, ) { if (showLeftButton) { Icon( - modifier = Modifier - .size(20.dp) - .clickable { onClickLeftButton() }, painter = painterResource(leftButtonDrawableRes), contentDescription = stringResource(leftButtonDescriptionRes), tint = WappTheme.colors.white, + modifier = Modifier + .size(20.dp) + .clickable { onClickLeftButton() } + .align(Alignment.CenterStart), ) } Text( text = stringResource(titleRes), textAlign = TextAlign.Center, - modifier = Modifier.weight(1f), style = WappTheme.typography.titleBold, color = WappTheme.colors.white, + modifier = Modifier.align(Alignment.Center), ) if (showRightButton) { Icon( - modifier = Modifier - .size(20.dp) - .clickable { onClickRightButton() }, painter = painterResource(rightButtonDrawableRes), contentDescription = stringResource(rightButtonDescriptionRes), tint = WappTheme.colors.white, + modifier = Modifier + .size(20.dp) + .clickable { onClickRightButton() } + .align(Alignment.CenterEnd), ) } }