How to use the @ant-design/icons-svg/lib/helpers.renderIconDefinitionToSVGElement function in @ant-design/icons-svg

To help you get started, we’ve selected a few @ant-design/icons-svg examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ant-design / ant-design-icons / packages / icons-angular / scripts / generate.ts View on Github external
await walk(async ({ svgIdentifier, name, theme, icon }) => {
    const inlineIcon = renderIconDefinitionToSVGElement({ name, theme, icon });

    svgIdentifier = adaptTheme(svgIdentifier);

    const _theme = adaptTheme(theme) as AngularTheme;

    // Generate static loading resources.
    await fsPromises.writeFile(
      path.resolve(__dirname, `../src/icons/${_theme}/${svgIdentifier}.ts`),
      staicFileRender({ svgIdentifier, name, theme: _theme, inlineIcon })
    );

    await fsPromises.writeFile(
      path.resolve(__dirname, `../src/inline-svg/${_theme}/${name}.svg`),
      svgRender({ inlineIcon })
    );

@ant-design/icons-svg

Abstract nodes for ant design icons.

MIT
Latest version published 10 months ago

Package Health Score

85 / 100
Full package analysis

Similar packages