diff --git a/CHANGELOG.md b/CHANGELOG.md index 18844406..5bdde9e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -- Nothing yet! +### Fixed + +- Fix React icon types ([#966](https://github.com/tailwindlabs/heroicons/pull/966)) ## [2.0.16] - 2023-02-17 diff --git a/scripts/build.js b/scripts/build.js index c29760c3..954fafc5 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -93,7 +93,7 @@ async function buildIcons(package, style, format) { let content = await transform[package](svg, componentName, format) let types = package === 'react' - ? `import * as React from 'react';\ndeclare const ${componentName}: React.ForwardRefExoticComponent & { title?: string, titleId?: string }>;\nexport default ${componentName};\n` + ? `import * as React from 'react';\ndeclare const ${componentName}: React.ForwardRefExoticComponent> & { title?: string, titleId?: string } & React.RefAttributes>;\nexport default ${componentName};\n` : `import type { FunctionalComponent, HTMLAttributes, VNodeProps } from 'vue';\ndeclare const ${componentName}: FunctionalComponent;\nexport default ${componentName};\n` return [