Skip to content

Commit

Permalink
Extract dimensions to their own val
Browse files Browse the repository at this point in the history
  • Loading branch information
LunarX committed Aug 19, 2024
1 parent c934e66 commit fdf235a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@ import com.infomaniak.swisstransfer.ui.theme.CustomShapes
import com.infomaniak.swisstransfer.ui.theme.Margin
import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme

private val BOTTOM_SHEET_ITEM_HEIGHT = 56.dp

@Composable
fun BottomSheetItem(imageVector: ImageVector, @StringRes titleRes: Int, onClick: () -> Unit) {
Button(
colors = ButtonDefaults.textButtonColors(contentColor = SwissTransferTheme.colors.primaryTextColor),
modifier = Modifier
.height(56.dp)
.height(BOTTOM_SHEET_ITEM_HEIGHT)
.fillMaxWidth(),
shape = CustomShapes.None,
onClick = onClick,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ import com.infomaniak.swisstransfer.ui.theme.Margin
import com.infomaniak.swisstransfer.ui.theme.Shapes
import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme

private val LARGE_BUTTON_HEIGHT = 56.dp

@Composable
fun LargeButton(
modifier: Modifier = Modifier,
Expand All @@ -47,7 +49,7 @@ fun LargeButton(
imageVector: ImageVector? = null,
) {
Button(
modifier = modifier.height(56.dp),
modifier = modifier.height(LARGE_BUTTON_HEIGHT),
colors = style.buttonColors(),
shape = Shapes.medium,
enabled = enabled,
Expand Down

0 comments on commit fdf235a

Please sign in to comment.