-
Notifications
You must be signed in to change notification settings - Fork 106
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
feat(Bonus Pagamenti Digitali): [#175263506] Create BPD card component #2338
Conversation
Affected stories
|
Codecov Report
@@ Coverage Diff @@
## master #2338 +/- ##
==========================================
- Coverage 48.68% 48.36% -0.32%
==========================================
Files 615 604 -11
Lines 17276 17045 -231
Branches 3111 3088 -23
==========================================
- Hits 8410 8244 -166
+ Misses 8824 8759 -65
Partials 42 42
Continue to review full report at Codecov.
|
…506-bpd-card-component
}); | ||
|
||
type BadgeDefinition = { | ||
style: any; |
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.
style: any; | |
style: StyleProp<ViewStyle>; |
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.
In order to avoid any
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 wanted to change it before opening the PR, but then missed it at the end. Thanks!
<Badge style={[formatStatusBadge().style, styles.badgeBase]}> | ||
<Text | ||
semibold={true} | ||
style={styles.badgeTextBase} | ||
dark={props.period.status !== "Closed"} | ||
> | ||
{formatStatusBadge().label} |
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.
In order to avoid multiple execution of the function formatStatusBadge
maybe we can use const badgeFormat = formatStatusBadge()
in BpdCardComponent
and use badgeFormat.style
and badgeFormat.label
.
What you think?
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.
absolutely! sounds good
Short description
This PR adds the base component for BPD card detail
Full card
Preview card