-
-
Notifications
You must be signed in to change notification settings - Fork 727
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
Add missing props from weekdayElement and caption Element #842
Conversation
Codecov Report
@@ Coverage Diff @@
## master #842 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 15 15
Lines 645 645
Branches 141 141
=====================================
Hits 645 645 Continue to review full report at Codecov.
|
2 similar comments
Codecov Report
@@ Coverage Diff @@
## master #842 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 15 15
Lines 645 645
Branches 141 141
=====================================
Hits 645 645 Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #842 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 15 15
Lines 645 645
Branches 141 141
=====================================
Hits 645 645 Continue to review full report at Codecov.
|
in props.d.ts, react-day-picker/types/props.d.ts Lines 65 to 78 in 39ad48e
think it's worth duplicating that here? or, better, making a type alias |
See #843 - depending on whether that is merged I'd be happy to switch this to an type alias |
Yeah it’s not that the way we are doing with those *Element props are right. Hope to fix that in the next mayor release. Thanks folks for the patience and the review! |
* Add missing props from weekdayElement and caption Element * Revert changes to docs
Changes:
I think the typings on
captionElement
andweekdayElement
are wrong, and I think the documentation is wrong too. Looking at the default props thatDayPicker
receives, it's clear that themonths
weekdaysShort
andweekdaysLong
are passed through to those elements if they are specified on theDayPicker
. This makes sense, how else will those elements be localized correctly. Therefore if I provide my own elements for the caption or weekday they'll need those props too.They actually get them 👍 so the only thing that's missing is to update the types. which I've done
I'd also would've updated the docs, but the template advised against that. I will volunteer to update them though :).