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(module): allow options override of @egoist/tailwindcss-icons plugin #1013

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

benjamincanac
Copy link
Member

πŸ”— Linked issue

Fixes #1002
Resolves #1010

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

In your nuxt.config.ts, the ui.icons option can now be an object to completely override the options of the @egoist/tailwindcss-icons plugin:

import { getIconCollections } from '@egoist/tailwindcss-icons'

export default defineNuxtConfig({
  ui: {
    icons: {
      // might solve stretch bug on generate, see https://github.com/egoist/tailwindcss-icons/issues/23
      extraProperties: {
        '-webkit-mask-size': 'contain',
        '-webkit-mask-position': 'center'
      },
      collections: {
        foo: {
          icons: {
            'arrow-left': {
              // svg body
              body: '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18" />',
              // svg width and height, optional
              width: 24,
              height: 24
            }
          }
        },
        ...getIconCollections(['heroicons', 'simple-icons'])
      }
    }
  }
})

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Copy link

vercel bot commented Nov 22, 2023

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated (UTC)
ui βœ… Ready (Inspect) Visit Preview Nov 22, 2023 1:29pm

@benjamincanac benjamincanac merged commit ec58948 into dev Nov 22, 2023
2 checks passed
@benjamincanac benjamincanac deleted the feat/iconify-options branch November 22, 2023 13:42
@RKAN
Copy link

RKAN commented Nov 27, 2023

Hey, thanks for the update. Just a short question? Maybe after this update the Editor Auto Suggest for the icons are not working anymore. Can you confirm this?

Copy link
Member Author

@RKAN I don't see how this could have break the Iconify IntelliSense extension. This PR just changed the nuxt config option.

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.

Iconify Custom Icons Stretched Icons when building project
2 participants