Skip to content

Commit

Permalink
refactor: Add a dimen for DoubleButtonCombo
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianDevel committed Dec 5, 2024
1 parent 7001dbe commit 85f1917
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.style.TextAlign
import com.infomaniak.swisstransfer.R
import com.infomaniak.swisstransfer.ui.theme.Margin
import com.infomaniak.swisstransfer.ui.theme.Dimens
import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme
import com.infomaniak.swisstransfer.ui.utils.PreviewLargeWindow
import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow
Expand All @@ -53,15 +53,11 @@ fun BottomStickyButtonScaffold(
.padding(contentPaddings),
horizontalAlignment = Alignment.CenterHorizontally,
) {
Box(
modifier = Modifier
.weight(1.0f),
content = content,
)
Box(modifier = Modifier.weight(1.0f), content = content)
DoubleButtonCombo(
modifier = Modifier.padding(vertical = Margin.Small),
modifier = Modifier.padding(vertical = Dimens.ButtonComboVerticalPadding),
topButton = topButton,
bottomButton = bottomButton
bottomButton = bottomButton,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import androidx.compose.ui.unit.dp
import com.infomaniak.swisstransfer.R
import com.infomaniak.swisstransfer.ui.images.AppImages.AppIllus
import com.infomaniak.swisstransfer.ui.images.illus.ArrowDownRightCurved
import com.infomaniak.swisstransfer.ui.theme.Dimens
import com.infomaniak.swisstransfer.ui.theme.Margin
import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme

Expand Down Expand Up @@ -133,7 +134,11 @@ private fun BottomSheetContent(
Spacer(Modifier.height(Margin.Large))
}

DoubleButtonCombo(topButton = topButton, bottomButton = bottomButton)
DoubleButtonCombo(
modifier = Modifier.padding(bottom = Dimens.ButtonComboVerticalPadding),
topButton = topButton,
bottomButton = bottomButton,
)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ object Dimens {
val SmallIconSize = 16.dp
val IconSize = 24.dp
val BorderWidth = 1.dp
val ButtonComboVerticalPadding = Margin.Small
}

0 comments on commit 85f1917

Please sign in to comment.