-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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(b-form-datepicker): add button-content
optionally scoped slot for icon
#4795
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #4795 +/- ##
=======================================
Coverage 99.93% 99.93%
=======================================
Files 263 263
Lines 5857 5857
Branches 1528 1528
=======================================
Hits 5853 5853
Misses 3 3
Partials 1 1
Continue to review full report at Codecov.
|
button-content
optionally scoped slot
We will wait to merge this, in case we need to release a patch version to v2.5.0 before v2.6.0 |
Wow, guys, you are so fast. Do I need to do something else? Thanks you a lot 🙏. |
@andrewvasilchuk I think we are fine here now. Thanks :) |
this.hasNormalizedSlot('button-content') | ||
? this.normalizeSlot('button-content', btnScope) | ||
: defaultButtonFn(btnScope) | ||
this.normalizeSlot('button-content', btnScope) || defaultButtonFn(btnScope) |
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.
The only issue with using ||
instead of a ternary, is that if the slot returns ''
it will render the default icon.
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.
@tmorehouse Hmm, haven't thought about that.
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.
We can always leave as-is for now, and people have issues we can use the hasNormalizedSlot
check.
button-content
optionally scoped slotbutton-content
optionally scoped slot for icon
what's the syntax for the button-content slot? |
got it, it's
|
Describe the PR
Add support for
button-content
slot, which will allow consumers to specify their own button icon/content.PR checklist
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
The PR fulfills these requirements:
dev
branch, not themaster
branch[...] (fixes #xxx[,#xxx])
, where "xxx" is the issue number)fix(alert): not alerting during SSR render
,docs(badge): update pill examples
,chore(docs): fix typo in README
, etc). This is very important, as theCHANGELOG
is generated from these messages.If new features/enhancement/fixes are added or changed:
package.json
for slot and event changes)If adding a new feature, or changing the functionality of an existing feature, the PR's
description above includes: