Skip to content

Commit

Permalink
chore(icon): change icon example type
Browse files Browse the repository at this point in the history
  • Loading branch information
ZWkang committed May 3, 2024
1 parent fe5aebc commit c08bd91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/icon/_example/Enhanced.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { Icon } from 'tdesign-icons-react';
import { Icon, IconProps } from 'tdesign-icons-react';

const CustomUrlIcon = ({ name, size, style }) => (
const CustomUrlIcon = ({ name, size, style }: Partial<Pick<IconProps, 'name' | 'size' | 'style'>>) => (
<Icon name={name} size={size} style={style} url="https://tdesign.gtimg.com/icon/default-demo/index.js" />
);

Expand Down
4 changes: 2 additions & 2 deletions src/icon/_example/IconFontEnhanced.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { IconFont } from 'tdesign-icons-react';
import { IconFont, IconProps } from 'tdesign-icons-react';

const CustomUrlIconFont = ({ name, size, style }) => (
const CustomUrlIconFont = ({ name, size, style }: Partial<Pick<IconProps, 'name' | 'size' | 'style'>>) => (
<IconFont name={name} size={size} style={style} url="https://tdesign.gtimg.com/icon/default-demo/index.css" />
);

Expand Down

0 comments on commit c08bd91

Please sign in to comment.