$ npm install @ant-design/icons
⭐ The abstract trees of the Ant Design SVG icons.
yarn add @ant-design/icons@next # or npm install @ant-design/icons@next --save
import { AlertOutline } from '@ant-design/icons';
console.log(AlertOutline);
// Output:
// {
// name: 'alert',
// theme: 'outline',
// icon: {
// tag: 'svg',
// attrs: { viewBox: '0 0 1024 1024' },
// children: [
// {
// tag: 'path',
// attrs: {
// d: 'M193 796a32 32 0 0 0 32 32h574a32....'
// }
// }
// ]
// }
// }
This library export all SVG files as IconDefinition
.
interface AbstractNode {
tag: string;
attrs: {
[key: string]: string;
};
children?: AbstractNode[];
}
interface IconDefinition {
name: string; // kebab-case-style
theme: ThemeType;
icon:
| ((primaryColor: string, secondaryColor: string) => AbstractNode)
| AbstractNode;
}
npm run generate # Generate files to ./src
npm run build # Build library
npm run test # Runing Test
© 2010 - cnpmjs.org x YWFE | Home | YWFE