-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TEMPURA-2060] Contribute to Backpack library Badge icon with Painter #2157
[TEMPURA-2060] Contribute to Backpack library Badge icon with Painter #2157
Conversation
Generated by 🚫 Danger Kotlin against 2a6ebab |
|
||
private val BadgeShape = RoundedCornerShape(BpkBorderRadius.Xs) | ||
|
||
private fun Modifier.defaultIconSize(size: BpkIconSize): Modifier = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think this is needed? badges should only ever have one icon size, so we don't need the BpkIconSize
prop here - they're always small
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
@@ -95,6 +97,14 @@ private fun BadgeRow( | |||
else -> BpkIcon.TickCircle | |||
}, | |||
) | |||
|
|||
BpkBadge( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please regenerate the docs screenshots as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
Row( | ||
modifier = modifier | ||
.semantics(mergeDescendants = true) { } | ||
.border(1.dp, type.borderColor, BadgeShape) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not new, but while we're here: BpkBorderSize.Sm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Copied functional from BpkButton to BpkBadge to add support for custom Badge icons. Compose only
Remember to include the following changes:
README.md
If you are curious about how we review, please read through the code review guidelines