-
-
Notifications
You must be signed in to change notification settings - Fork 566
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
Build d.ts for use in typescript #277
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/lucide/lucide/ECoAj4NgQAR1XvXTZK1umDQwbGx5 [Deployment for 9ca395c canceled] |
@SMAH1 Thank you very much, very nice work! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of days ago I tried to fix this issue as well.
I came with this solution.
The attrs object you can pass in the createIcon function is also able to use other attributes then the attributes we commonly use in our icons. See comment at the createIconsOptions type.
The icons data is for this package is a bit different then we use for the framework packages.
We use: [tag, attrs, children]
for the icons, in framework packages: [iconName, children]
, I tried to make it the same but for createElement
we use an recursive function to render the svgs, so it was not possible to use the [iconName, children]
format.
I'm curious what think of the additions what I made.
And change Activity = ['svg', defaultAttributes, [['polyline', {
points: '22 12 18 12 15 21 9 3 6 12 2 12'
}]]]; define three sections: 1) |
Co-authored-by: Eric Fennis <[email protected]>
Co-authored-by: Eric Fennis <[email protected]>
Co-authored-by: Eric Fennis <[email protected]>
Co-authored-by: Eric Fennis <[email protected]>
Co-authored-by: Eric Fennis <[email protected]>
Co-authored-by: Eric Fennis <[email protected]>
Co-authored-by: Eric Fennis <[email protected]>
@SMAH1 Nice work. Can you maybe remove the code for the |
Pretty code
I test release 0.15.1. It is fine. |
* Add lucide-angular * Build d.ts for use in typescript * Update packages/lucide/scripts/buildTypes.js Co-authored-by: Eric Fennis <[email protected]> * Update packages/lucide/scripts/buildTypes.js Co-authored-by: Eric Fennis <[email protected]> * Update packages/lucide/scripts/buildTypes.js Co-authored-by: Eric Fennis <[email protected]> * Update packages/lucide/scripts/buildTypes.js Co-authored-by: Eric Fennis <[email protected]> * Update packages/lucide/scripts/buildTypes.js Co-authored-by: Eric Fennis <[email protected]> * Update packages/lucide/scripts/buildTypes.js Co-authored-by: Eric Fennis <[email protected]> * Update packages/lucide/scripts/buildTypes.js Co-authored-by: Eric Fennis <[email protected]> * Update packages/lucide/scripts/buildTypes.js * Update package.json * Update package.json * Delete .gitignore * Delete angular.json * Delete package.json * Delete README.md * Delete default-attributes.ts * Delete icons-index.ts * Delete package.json * Delete karma.conf.js * Delete lucide.ts * Delete ng-package.json * Delete package.json * Delete lib-index.ts * Delete icons.provider.ts * Delete lucide-angular.component.spec.ts * Delete lucide-angular.component.ts * Delete lucide-angular.module.ts * Delete test.ts * Delete tsconfig.lib.json * Delete tsconfig.lib.prod.json * Delete tsconfig.spec.json * Delete tslint.json * Delete buildIconsIndex.js * Delete exportTemplate.js * Delete tsconfig.json * Delete tslint.json * Update buildTypes.js Pretty code Co-authored-by: Eric Fennis <[email protected]>
How to use
in
html
file:in
ts
file:and for use all icons:
I test it in Angular App and without app (typescript + webpack)