How to use @ant-design/icons-svg - 2 common examples

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 })
    );
github ant-design / ant-design-icons / packages / icons-react / scripts / utils.js View on Github external
exports.getComponentNameList = () => {
  const icons = [];
  Object.keys(manifest).forEach(theme => {
    manifest[theme].forEach(name => {
      const baseName = upperFirst(camelCase(name));
      icons.push({
        theme,
        componentName: baseName + upperFirst(themeMap[theme]),
        svgName: baseName + upperFirst(theme === 'twotone' ? 'twoTone' : theme),
      });
    });
  });
  return icons;
}

@ant-design/icons-svg

Abstract nodes for ant design icons.

MIT
Latest version published 3 months ago

Package Health Score

90 / 100
Full package analysis

Similar packages