Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 1.01 KB

index.en-us.md

File metadata and controls

41 lines (30 loc) · 1.01 KB

Icon

  • category: Components
  • family: General
  • type: Display
  • cols: 1

API

Icon

Param Descripiton Type Default Value
size To set the icon size

option:
'xxs', 'xs', 'small', 'medium', 'large', 'xl', 'xxl', 'xxxl', 'inherit'
Enum 'medium'
type Specify which icon to display String -

Icon.createFromIconfontCN

If you want to use svg icon, use Icon.createFromIconfontCN.

import { Icon } from '@alifd/next';

const CustomIcon = Icon.createFromIconfontCN({
    scriptUrl: '//at.alicdn.com/t/font_1464085_egnk4s8yv2f.js',
});

// CustomIcon have the same props as Icon, e.g. size
ReactDOM.render(
    <div>
        <CustomIcon type="icon-store" size="small"/>
        <CustomIcon type="icon-gift"/>
        <CustomIcon type="icon-pic" size="large"/>
    </div>
, mountNode);