-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Dependency injection implementation * Code cleanup * Code cleanup * Test hotfix * [#1420] Choose Server UI refactor * [#1420] UI refactor * [#1420] Code cleanup * [#1420] SDK integration * [#1420] Choose server redesign Closes #1420 * [#1420] Code cleanup Closes #1420 * #1420 Design updates Closes #1420 * #1420 Design updates Closes #1420 * #1420 Code cleanup Closes #1420 * #1420 Code cleanup Closes #1420 * #1420 Code cleanup Closes #1420 * #1420 Design hotfixes Closes #1420 * #1420 Design hotfixes Closes #1420 * #1420 Code cleanup Closes #1420 * #1420 Design hotfixes Closes #1420 * #1420 Design hotfixes Closes #1420 * Remove unnecessary supression * Remove unnecessary dependency - We link these by the command api(libs.bundles.koin) above * [#1420] Code cleanup Closes #1420 * Changelogs update --------- Co-authored-by: Honza <[email protected]>
- Loading branch information
1 parent
85a545b
commit b75836f
Showing
57 changed files
with
2,305 additions
and
872 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
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
53 changes: 53 additions & 0 deletions
53
ui-design-lib/src/main/java/co/electriccoin/zcash/ui/design/component/Badge.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,53 @@ | ||
package co.electriccoin.zcash.ui.design.component | ||
|
||
import androidx.compose.foundation.BorderStroke | ||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.shape.CircleShape | ||
import androidx.compose.material3.Surface | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.graphics.Shape | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import androidx.compose.ui.unit.dp | ||
import androidx.compose.ui.unit.sp | ||
import co.electriccoin.zcash.ui.design.theme.ZcashTheme | ||
import co.electriccoin.zcash.ui.design.util.StringResource | ||
import co.electriccoin.zcash.ui.design.util.getValue | ||
import co.electriccoin.zcash.ui.design.util.stringRes | ||
|
||
@Composable | ||
fun Badge( | ||
text: StringResource, | ||
modifier: Modifier = Modifier, | ||
shape: Shape = CircleShape, | ||
color: Color = ZcashTheme.zashiColors.utilitySuccess50, | ||
border: BorderStroke = BorderStroke(1.dp, ZcashTheme.zashiColors.utilitySuccess200), | ||
) { | ||
Surface( | ||
modifier = modifier, | ||
shape = shape, | ||
color = color, | ||
border = border | ||
) { | ||
Box( | ||
modifier = Modifier.padding(horizontal = 10.dp, vertical = 4.dp) | ||
) { | ||
Text( | ||
text = text.getValue(), | ||
style = ZcashTheme.extendedTypography.transactionItemStyles.contentMedium, | ||
fontSize = 14.sp, | ||
color = ZcashTheme.zashiColors.utilitySuccess700 | ||
) | ||
} | ||
} | ||
} | ||
|
||
@Preview | ||
@Composable | ||
private fun BadgePreview() = | ||
ZcashTheme { | ||
Badge(text = stringRes("Badge")) | ||
} |
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.