From cb6e10c79a6418557ea34c066febaa56659ba437 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Thu, 30 Mar 2023 16:38:11 -0400 Subject: [PATCH] Fix React icon types (#966) * Fix React icon types * Update changelog --- CHANGELOG.md | 4 +++- scripts/build.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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 [