Skip to content

Commit

Permalink
Fix React ref type (#903)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandernanberg authored Jan 25, 2023
1 parent edb9526 commit f53375d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'> & { title?: string, titleId?: string }): JSX.Element;\nexport default ${componentName};\n`
? `import * as React from 'react';\ndeclare const ${componentName}: React.ForwardRefExoticComponent<React.SVGProps<SVGSVGElement> & { title?: string, titleId?: string }>;\nexport default ${componentName};\n`
: `import type { FunctionalComponent, HTMLAttributes, VNodeProps } from 'vue';\ndeclare const ${componentName}: FunctionalComponent<HTMLAttributes & VNodeProps>;\nexport default ${componentName};\n`

return [
Expand Down

0 comments on commit f53375d

Please sign in to comment.