Skip to content

fix: incorrect Props.path.path type#11

Open
skyrpex wants to merge 1 commit into
amoutonbrady:masterfrom
skyrpex:patch-1
Open

fix: incorrect Props.path.path type#11
skyrpex wants to merge 1 commit into
amoutonbrady:masterfrom
skyrpex:patch-1

Conversation

@skyrpex
Copy link
Copy Markdown

@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