@@ -332,7 +332,7 @@ export default SvgComponent;"
332
332
333
333
exports[`plugin typescript with "descProp" and "expandProps" adds "desc", "descId" props and expands props 1`] = `
334
334
"import * as React from "react";
335
- import { SVGProps } from "react";
335
+ import type { SVGProps } from "react";
336
336
interface SVGRProps {
337
337
desc ?: string ;
338
338
descId ?: string ;
@@ -347,7 +347,7 @@ export default SvgComponent;"
347
347
348
348
exports[`plugin typescript with "expandProps" add props 1`] = `
349
349
"import * as React from "react";
350
- import { SVGProps } from "react";
350
+ import type { SVGProps } from "react";
351
351
const SvgComponent = (props: SVGProps<SVGSVGElement >) => <svg ><g /></svg >;
352
352
export default SvgComponent;"
353
353
`;
@@ -377,7 +377,8 @@ export default img;"
377
377
378
378
exports[`plugin typescript with "native" and "expandProps" option adds import from "react-native-svg" and adds props 1`] = `
379
379
"import * as React from "react";
380
- import Svg, { SvgProps } from "react-native-svg";
380
+ import Svg from "react-native-svg";
381
+ import type { SvgProps } from "react-native-svg";
381
382
const SvgComponent = (props: SvgProps) => <Svg ><g /></Svg >;
382
383
export default SvgComponent;"
383
384
`;
@@ -391,7 +392,8 @@ export default SvgComponent;"
391
392
392
393
exports[`plugin typescript with "native", "ref" and "expandProps" option adds import from "react-native-svg" and adds props and adds ForwardRef component 1`] = `
393
394
"import * as React from "react";
394
- import Svg, { SvgProps } from "react-native-svg";
395
+ import Svg from "react-native-svg";
396
+ import type { SvgProps } from "react-native-svg";
395
397
import { Ref , forwardRef } from "react";
396
398
const SvgComponent = (props: SvgProps, ref: Ref<SVGSVGElement >) => <Svg ><g /></Svg >;
397
399
const ForwardRef = forwardRef(SvgComponent);
@@ -409,7 +411,8 @@ export default ForwardRef;"
409
411
410
412
exports[`plugin typescript with "ref" and "expandProps" option expands props 1`] = `
411
413
"import * as React from "react";
412
- import { SVGProps , Ref , forwardRef } from "react";
414
+ import type { SVGProps } from "react";
415
+ import { Ref , forwardRef } from "react";
413
416
const SvgComponent = (props: SVGProps<SVGSVGElement >, ref: Ref<SVGSVGElement >) => <svg ><g /></svg >;
414
417
const ForwardRef = forwardRef(SvgComponent);
415
418
export default ForwardRef;"
@@ -425,7 +428,7 @@ export default ForwardRef;"
425
428
426
429
exports[`plugin typescript with "titleProp" "descProp" and "expandProps" adds "title", "titleId", "desc", "descId" props and expands props 1`] = `
427
430
"import * as React from "react";
428
- import { SVGProps } from "react";
431
+ import type { SVGProps } from "react";
429
432
interface SVGRProps {
430
433
title ?: string ;
431
434
titleId ?: string ;
@@ -474,7 +477,7 @@ export default SvgComponent;"
474
477
475
478
exports[`plugin typescript with "titleProp" and "expandProps" adds "title", "titleId" props and expands props 1`] = `
476
479
"import * as React from "react";
477
- import { SVGProps } from "react";
480
+ import type { SVGProps } from "react";
478
481
interface SVGRProps {
479
482
title ?: string ;
480
483
titleId ?: string ;
1 commit comments
vercel[bot] commentedon May 9, 2023
Successfully deployed to the following URLs:
svgr – ./
svgr-gregberge.vercel.app
api.react-svgr.com
svgr-git-main-gregberge.vercel.app