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

feat(lucide-react): Add DynamicIcon component #2686

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ericfennis
Copy link
Member

@ericfennis ericfennis commented Dec 11, 2024

Closes #2366
Closes #2269
Closes #1828
Closes #1767
Closes #1730
Closes #1725
Closes #1576
Closes #2030
Closes #2437

What is the purpose of this pull request?

  • New Icon
  • Bug fix
  • New Feature
  • Documentation update
  • Other:

Description

Adding the DynamicIcon component, this will make the framework specific ways of working with Dynamic imports not an issue since the DynamicIcon is working standalone.

Difference with current dynamicIconImports file.
Currently, it exports a map of all icon components. The DynamicIcon uses the same map, but is not using the components but only the icon nodes and renders the icon in the DynamicIcon.

In the future we will expose a different package wich exposes the dynamic imports with IconNodes, this will be available for other packages as well.

TODO:

  • Add feature
  • Docs
  • Testing:
    • Test on NextJS
    • Test on Vite
    • Test on NextJS with Turbo
    • Test on Remix

@github-actions github-actions bot added the ⚛️ react package Lucide React Package label Dec 11, 2024
@github-actions github-actions bot added 📖 documentation Improvements or additions to documentation 🌍 site Has to do something with the Lucide website labels Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment