Skip to content
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

Slight modification to sample code #2558

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

Louis-jk
Copy link
Contributor

@Louis-jk Louis-jk commented Oct 25, 2024

Pull Request Template

Thanks for your PR! Make sure you have read the CONTRIBUTING guide.

What's Changed

I noticed that the example code in the documentation at daypicker.dev/upgrading#7 is missing the arrow in the arrow function. I created this pull request to address that issue. I hope this helps improve the documentation!

  <DayPicker
    components={{
-     IconLeft: MyLeftIcon,
+     Chevron: (props) {
+        if (props.orientation === "left") {
+          return <MyLeftIcon {...props} />;
+        }
+       return <Chevron {...props} />;
+     }
  }}
  />

  <DayPicker
    components={{
-     IconLeft: MyLeftIcon,
+     Chevron: (props) => {
+        if (props.orientation === "left") {
+          return <MyLeftIcon {...props} />;
+        }
+       return <Chevron {...props} />;
+     }
  }}
  />

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Tips for a good PR

  • If you are changing code, please add tests to cover the changes.
  • Some screenshots or screen recording could help to understand the changes.
  • If it is a bug, please provide the code to reproduce it.

Thanks

Additional Notes

Add any extra comments or questions here.

@gpbl
Copy link
Owner

gpbl commented Oct 25, 2024

Thanks!

@gpbl gpbl merged commit ced749e into gpbl:main Oct 25, 2024
10 checks passed
@Louis-jk
Copy link
Contributor Author

Louis-jk commented Oct 26, 2024

Thanks!

Thank you for creating such an excellent library!

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