Remix-Design / RemixIcon

Open source neutral style icon system
https://remixicon.com
Apache License 2.0
6.67k stars 489 forks source link

export RemixiconComponentType? #721

Closed niaodan2b closed 7 months ago

niaodan2b commented 8 months ago

So in my project(React+Typescript) I have something like this:

type ButtonType = {
  label: string
  icon: RemixiconComponentType
  url: string 
}

const ButtonList: ButtonType[] = [
  { label: 'Github', icon: RiGithubLine, url: 'https://github.com' },
  { label: 'Youtube', icon: RiYoutubeLine, url: 'https://www.youtube.com' },
  { label: 'Twitter', icon: RiTwitterLine, url: 'https://twitter.com' },
]

But RemixiconComponentType is not exported from @remixicon/react, so how do i type ButtonType.icon?

rickyzhangca commented 7 months ago

need this!

wendygaoyuan commented 7 months ago

@niaodan2b @rickyzhangca Hi, in 4.2.0, we added the export of RemixiconComponentType