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: incorrect Props.path.path type #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

skyrpex
Copy link

@skyrpex skyrpex commented Oct 20, 2023

The generated icon files in the solid.heroicons NPM package use the following type:

interface {
  path: () => JSX.Element;
  outline?: boolean;
  mini?: boolean;
}

For example, export const academicCap = { path: () => <><path stroke-linecap="round" stroke-linejoin="round" d="M4.26 10.147a60.436..."/></>, outline: true, mini: false };

But the current definition in the Icon Props is path: JSX.Element. Defining custom icons as path: JSX.Element doesn't work, it needs to be a function.

The generated icon files use the following type:

```
interface {
  path: () => JSX.Element;
  outline?: boolean;
  mini?: boolean;
}
```

But the current definition in `Props` for `path` is `path: JSX.Element`. Defining custom icons as `path: JSX.Element` doesn't work.
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.

1 participant