Skip to content

Commit

Permalink
style: fix ts type error
Browse files Browse the repository at this point in the history
  • Loading branch information
mutu committed Jul 30, 2024
1 parent 6d1b55f commit b6f7ba5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/gi-common-components/src/Icon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import IconFont, { createFromIconfontCN } from '@ant-design/icons';
import Graphin from '@antv/graphin';
import React from 'react';
import React, { ElementType } from 'react';
import { loadFontJson, loadUnicodeFont, type FontJson } from './loader';

export const fontFamily = 'iconfont';
Expand Down Expand Up @@ -69,7 +69,7 @@ interface IconProps extends React.HTMLProps<HTMLSpanElement> {
/**
* @reference https://github.com/ant-design/ant-design-icons/blob/master/packages/icons-react/src/components/IconFont.tsx
*/
export const Icon = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
export const Icon: ElementType = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
const { type, children, ...restProps } = props;
let content: React.ReactNode = null;
if (props.type) {
Expand Down

0 comments on commit b6f7ba5

Please sign in to comment.