Skip to content

Conversation

KeeganW
Copy link
Contributor

@KeeganW KeeganW commented May 26, 2025

Description

This changes the type of previousYearButtonLabel and nextYearButtonLabel to be React.ReactNode. This mirrors previousMonthButtonLabel and nextMonthButtonLabel, which is already of type React.ReactNode.

Problem
When using month picker, the YearButtonLabels allow for specifying a ReactNode (the code here implies that it is expected to not always be a string), but typescript rightfully complains because the type doesn't line up.

Changes
This PR changes previousYearButtonLabel and nextYearButtonLabel to be the type React.ReactNode instead of string

Screenshots

NA

To reviewers

Contribution checklist

  • I have followed the contributing guidelines.
  • I have added sufficient test coverage for my changes.
  • I have formatted my code with Prettier and checked for linting issues with ESLint for code readability.

@KeeganW KeeganW changed the title Change type on YearButtonLabel to be the type ReactNode. fix(calendar): Change type on YearButtonLabel to be the type ReactNode. May 26, 2025
@codecov
Copy link

codecov bot commented May 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.11%. Comparing base (72bd657) to head (69ef33d).
Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5659      +/-   ##
==========================================
+ Coverage   96.99%   97.11%   +0.11%     
==========================================
  Files          30       30              
  Lines        3363     3363              
  Branches     1419     1423       +4     
==========================================
+ Hits         3262     3266       +4     
+ Misses         99       95       -4     
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@martijnrusschen martijnrusschen merged commit 2542382 into Hacker0x01:main May 27, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants