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

add unplugin-icons as icon manager #3708

Closed
wants to merge 2 commits into from
Closed

Conversation

briangregoryholmes
Copy link
Contributor

The intent of this PR is to simplify the current approach of creating individual Svelte components for application icons by instead using unplugin-icons as a management layer. In this approach, the majority of icons can be used immediately and directly by simply referencing the icon name from Figma.

For instance, the design system references some icons in the Ant Design library: https://icones.js.org/collection/ant-design

Instead of exporting/copying the SVG data from Figma, creating a new component file in the icons folder, deciding on a name, and then importing that where necessary, you could now do the following:

<script>
    import StepForward from "~icons/ant-design/step-forward-outline"
</script>

<StepForward class="text-red-400"/>

Icons can be customized using Tailwind using the text utility classes.

While importing collections like Ant Design or Radix installs the full icon set, only the icons we actually use will be bundle into the production build

  • Adds and configures the unplugin-icons package
  • Updates the sidebar footer to use this new approach (as an example) and makes small tweaks to better match the Figma designs

@briangregoryholmes briangregoryholmes self-assigned this Dec 15, 2023
@nishantmonu51
Copy link
Collaborator

closing Draft due to inactivity here. Lets reopen when ready.

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