Ant Design Icons
⭐ The abstract node of the Ant Design SVG icons.
Check all icons list.
Install
$ yarn add @easyv/icons-svg
$ npm install @easyv/icons-svg --save
Use Library Adapter
Contribution Guide 贡献指南
See contribution guide. English | 中文
Get started
import { AccountBookOutlined } from '@easyv/icons-svg';
console.log(AccountBookOutlined);
This library export all SVG files as IconDefinition
.
export declare type ThemeType = 'filled' | 'outlined' | 'twotone';
export interface AbstractNode {
tag: string;
attrs: {
[key: string]: string;
};
children?: AbstractNode[];
}
export interface IconDefinition {
name: string;
theme: ThemeType;
icon:
| ((primaryColor: string, secondaryColor: string) => AbstractNode)
| AbstractNode;
}
Render Helpers
import { AccountBookFilled } from '@easyv/icons-svg';
import { renderIconDefinitionToSVGElement } from '@easyv/icons-svg/es/helpers';
const svgHTMLString = renderIconDefinitionToSVGElement(AccountBookFilled, {
extraSVGAttrs: { width: '1em', height: '1em', fill: 'currentColor' }
});
console.log(svgHTMLString);
declare function renderIconDefinitionToSVGElement(
icon: IconDefinition,
options?: HelperRenderOptions
): string;
interface HelperRenderOptions {
placeholders?: {
primaryColor?: string;
secondaryColor?: string;
};
extraSVGAttrs?: {
[key: string]: string;
};
}