-
Notifications
You must be signed in to change notification settings - Fork 449
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor Profile UI * Fixed Build Issue * Profile UI Bug Fix & Improvement * added placeholder for when uri is null cleanup fix spotless test failure * Fix - CI Build Issue --------- Co-authored-by: Sk Niyaj Ali <[email protected]>
- Loading branch information
Showing
40 changed files
with
1,091 additions
and
594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/IconBox.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* Copyright 2024 Mifos Initiative | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
* | ||
* See https://github.com/openMF/mobile-wallet/blob/master/LICENSE.md | ||
*/ | ||
package org.mifospay.core.designsystem.component | ||
|
||
import androidx.compose.foundation.BorderStroke | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material3.Icon | ||
import androidx.compose.material3.OutlinedIconButton | ||
import androidx.compose.material3.Surface | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.vector.ImageVector | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import androidx.compose.ui.unit.dp | ||
import org.mifospay.core.designsystem.icon.MifosIcons | ||
import org.mifospay.core.designsystem.theme.MifosTheme | ||
import org.mifospay.core.designsystem.theme.NewUi | ||
|
||
@Composable | ||
fun IconBox( | ||
icon: ImageVector, | ||
onClick: () -> Unit, | ||
modifier: Modifier = Modifier, | ||
) { | ||
OutlinedIconButton( | ||
onClick = onClick, | ||
modifier = modifier, | ||
shape = RoundedCornerShape(12.dp), | ||
border = BorderStroke(2.dp, NewUi.onSurface.copy(alpha = 0.1f)), | ||
) { | ||
Icon( | ||
imageVector = icon, | ||
contentDescription = icon.name, | ||
) | ||
} | ||
} | ||
|
||
@Composable | ||
@Preview | ||
private fun IconBoxPreview( | ||
modifier: Modifier = Modifier, | ||
) { | ||
MifosTheme { | ||
Surface { | ||
IconBox( | ||
icon = MifosIcons.ArrowBack2, | ||
modifier = modifier, | ||
onClick = {}, | ||
) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.