diff --git a/website/src/pages/docs/typescript.mdx b/website/src/pages/docs/typescript.mdx index c8ba4e93..3e3f4b0d 100644 --- a/website/src/pages/docs/typescript.mdx +++ b/website/src/pages/docs/typescript.mdx @@ -46,8 +46,8 @@ module.exports = { ) { const typeScriptTpl = template.smart({ plugins: ['typescript'] }) return typeScriptTpl.ast` - import * as React from 'react'; - const ${componentName} = (props: React.SVGProps) => ${jsx}; + import React, { SVGProps } from 'react'; + const ${componentName} = (props: SVGProps) => ${jsx}; export default ${componentName}; ` },