diff --git a/CHANGELOG.md b/CHANGELOG.md index 2823a8efd..58eeaa85c 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 + +- Add `title` and `titleId` props to the React types ([#814](https://github.com/tailwindlabs/heroicons/pull/814)) ## [2.0.11] - 2022-09-12 diff --git a/scripts/build.js b/scripts/build.js index d4e392baf..859191373 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 function ${componentName}(props: React.ComponentProps<'svg'>): JSX.Element;\nexport default ${componentName};\n` + ? `import * as React from 'react';\ndeclare function ${componentName}(props: React.ComponentProps<'svg'> & { title?: string, titleId?: string }): JSX.Element;\nexport default ${componentName};\n` : `import type { FunctionalComponent, HTMLAttributes, VNodeProps } from 'vue';\ndeclare const ${componentName}: FunctionalComponent;\nexport default ${componentName};\n` return [