mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-16 21:27:42 +01:00
* Small adjustments * Format code * format code * Remove default value * format code * update yml file * Format code * Update docs/.vitepress/theme/components/base/Input.vue Co-authored-by: Karsa <contact@karsa.org> * Add extra check if null or undefined --------- Co-authored-by: Karsa <contact@karsa.org>
16 lines
606 B
TypeScript
16 lines
606 B
TypeScript
import { createLucideIcon } from 'lucide-react/src/lucide-react';
|
|
import { type LucideProps, type IconNode } from 'lucide-react/src/types';
|
|
import { IconEntity } from '../theme/types';
|
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
import { IconContent } from './generateZip';
|
|
|
|
const getFallbackZip = (icons: IconEntity[], params: LucideProps) => {
|
|
return icons.map<IconContent>((icon) => {
|
|
const Icon = createLucideIcon(icon.name, icon.iconNode as IconNode);
|
|
const src = renderToStaticMarkup(<Icon {...params} />);
|
|
return [icon.name, src];
|
|
});
|
|
};
|
|
|
|
export default getFallbackZip;
|