$ npm install @ant-design/icons
⭐ The abstract trees of the Ant Design SVG icons.
⚠️ The APIs and icons may change in the future, please do NOT use in any production environment.
yarn add @ant-design/icons # or npm install @ant-design/icons --save
import { AntDesign } from '@ant-design/icons/es';
console.log(AntDesign);
// Output:
// { name: 'ant-design',
// tag: 'svg',
// attrs:
// { xmlns: 'http://www.w3.org/2000/svg',
// viewBox: '0 0 1024 1024' },
// children:
// [ { tag: 'path', attrs: [Object], children: [] },
// { tag: 'path', attrs: [Object], children: [] } ] }
This library export all SVG files as IconDefinition
.
interface AbstractNode {
tag: string;
attrs: {
[key: string]: string;
};
children: AbstractNode[];
}
interface IconDefinition extends AbstractNode {
name: string; // kebab-case-style
}
npm run generate # Generate files to ./src
npm run build # Build library
npm run test # Runing Test
© 2010 - cnpmjs.org x YWFE | Home | YWFE