Skip to content

Commit

Permalink
feat: Iconfont component
Browse files Browse the repository at this point in the history
  • Loading branch information
LeleDallas committed May 4, 2023
1 parent 164d9b2 commit c662b9c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Iconfont.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { createFromIconfontCN } from '@ant-design/icons';

const CreateIconFont = createFromIconfontCN({
scriptUrl: '//at.alicdn.com/t/c/font_3378177_orth234lbl.js',
});


interface IconFontProps {
type: string;
style?: React.CSSProperties
className?: string
onClick?: () => void
}
const IconFont = ({ type, style, className = "", onClick }: IconFontProps) =>
<CreateIconFont onClick={onClick} style={style} type={type} className={className} />

export default IconFont;

0 comments on commit c662b9c

Please sign in to comment.