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

fix(www): remove unused icon from new-york mode-toggle button of NextJS Dark Mode #6575

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

AjayPawarExist
Copy link
Contributor

Description:

This PR fixes an issue in the New York style mode-toggle button for Dark Mode in Next.js (reference).
Screenshot 2025-02-05 at 22 55 41

Issue:

  • The New York style mode-toggle component had an extra unused icon from lucide-react, which caused errors when running npm run build.
  • Every time users downloaded the component, they encountered this error and had to manually remove the unused icon.
  • The default style does not have this issue—only the New York style is affected.

Fix:

  • Removed the unnecessary icon import from lucide-react, preventing the build error.
  • Ensured that the component works without manual fixes.

Files Modified:

  • apps/www/registry/new-york/examples/mode-toggle.tsx
Screenshot 2025-02-05 at 22 49 13 -> Screenshot 2025-02-05 at 22 50 11
  • apps/www/public/r/styles/new-york/mode-toggle.json
Screenshot 2025-02-05 at 22 50 35 -> Screenshot 2025-02-05 at 22 51 00

Additional Steps:

  • ✅ Ran pnpm build:registry to update the registry.
  • ✅ Verified that the default style is unaffected.
  • ✅ Passed all tests with pnpm test.
Screenshot 2025-02-05 at 22 32 32

This ensures a smooth experience for users downloading the New York mode-toggle component.

Let me know if any further changes are required. Thanks! 🚀

Copy link

vercel bot commented Feb 5, 2025

@AjayPawarExist is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Collaborator

@shadcn shadcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

Copy link

vercel bot commented Feb 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
v4 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2025 4:04pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
ui ⬜️ Ignored (Inspect) Visit Preview Feb 12, 2025 4:04pm

@shadcn shadcn merged commit 592ef33 into shadcn-ui:main Feb 12, 2025
7 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