-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove @reach/skip-nav from the dependencies #1051
Conversation
…nk/SkipNavContent components
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Thank you for this perfect PR, and I appreciate your effort to adjust the styling! One last request, could you also include the license file of Reach in our codebase, as we are now directly including their code? |
Sure things! I've just added the license note. Let me know if the format is ok. |
Thank you ! |
If a user tries to install
nextra-theme-docs
using npm while using React 18, he gets the following message:The mentioned problem indicates that the
@reach/skip-nav
library does not support React 18 in its peer dependencies. Normally, I would have opened a PR in the@reach/skip-nav
library, but the following message indicates that the library is no longer maintained.reach/reach-ui#972
Since
nextra-theme-docs
uses very little @reach and its only dependency is the@reach/skip-nav
library (@reach/skip-nav
is a small React component library allowing users browsing with their keyboard to jump directly to content without having to navigate through the menu.), I have included the latter's code in the project. (see: https://github.com/shuding/nextra/pull/1051/files#diff-01447ecc1f1f9351440e99fe52c4f3538f1369bb8ac7a57500ac1d2249ae53cb).I also took the opportunity, while making sure not to introduce any breaking changes, to provide a default visual style (on opt-in until the next major) that matches
nextra-theme-docs
and I added the possibility to change the label.The button light UI
The button dark UI
Light UI usage
Dark UI usage
RTL UI usage