mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-12 13:38:32 +00:00
* Add directory * Add lab check script * Delete duplicated icons * Fix the lab page * Adjust paths * update lockfile * update lockfile * fix(lab/planet): replace with guideline-compliant design * Add install step * Add second install step * Adjust lab in site * try this * Fix workflow * Add cspell * Format code * Temporary delete icons for copilot review * Place back lab icons * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Update lock file * Revert svg changes * Fix list * Rename filenames * Format tsconfig --------- Co-authored-by: Karsa <contact@karsa.org> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
27 lines
807 B
JavaScript
27 lines
807 B
JavaScript
/* eslint-disable import/no-extraneous-dependencies */
|
|
import base64SVG from '@lucide/build-icons/utils/base64SVG.mjs';
|
|
import { toCamelCase } from '@lucide/helpers';
|
|
|
|
export default ({ componentName, iconName, children, getSvg, deprecated }) => {
|
|
const svgContents = getSvg();
|
|
const svgBase64 = base64SVG(svgContents);
|
|
|
|
return `
|
|
import type { IconNode } from '../types';
|
|
|
|
/**
|
|
* @name ${iconName}
|
|
* @description Lucide Lab SVG icon node.
|
|
*
|
|
* @preview  - https://lucide.dev/icons/${iconName}
|
|
* @see https://lucide.dev/guide/packages/lucide - Documentation
|
|
*
|
|
* @returns {Array}
|
|
* ${deprecated ? '@deprecated' : ''}
|
|
*/
|
|
const ${toCamelCase(componentName)}: IconNode = ${JSON.stringify(children)};
|
|
|
|
export default ${toCamelCase(componentName)};
|
|
`;
|
|
};
|