Package Exports
- @ant-design/icons
- @ant-design/icons/lib
- @ant-design/icons/lib/manifest
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ant-design/icons) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Ant Design Icons
⭐ The abstract trees of the Ant Design SVG icons.
Status: Alpha
The APIs and icons may change in the future, please do NOT use in any production environment.
Install
yarn add @ant-design/icons # or npm install @ant-design/icons --save
Use Library Adapter
- React: See @ant-design/icons-react
- Vue: WIP
- Angular: WIP
Usage
import { Alibaba } from '@ant-design/icons/esm';
console.log(Alibaba);
// Output:
// { width: 1024,
// height: 1024,
// style: '',
// children:
// [ { tag: 'path', attrs: [Object] },
// { tag: 'path', attrs: [Object] } ],
// name: 'alibaba' }
Interface
This library export all SVG files as IconDefinition
.
interface IconDefinition extends IAbstractTree {
name: string; // kebab-case-style
}
interface IAbstractTree {
width: number;
height: number;
style?: string;
children: Array<{ tag: string, attrs: { [key: string]: string } }>;
}
Build
npm run generate # generate src/svgs.ts
npm run build # generate module bundle