mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-15 21:17:41 +01:00
fix(lucide-preact): handle className prop (#3751)
This commit is contained in:
@@ -10,7 +10,7 @@ import type { IconNode, LucideIcon, LucideProps } from './types';
|
||||
* @returns {FunctionComponent} LucideIcon
|
||||
*/
|
||||
const createLucideIcon = (iconName: string, iconNode: IconNode): LucideIcon => {
|
||||
const Component = ({ class: classes = '', children, ...props }: LucideProps) =>
|
||||
const Component = ({ class: classes = '', className = '', children, ...props }: LucideProps) =>
|
||||
h(
|
||||
Icon,
|
||||
{
|
||||
@@ -20,6 +20,7 @@ const createLucideIcon = (iconName: string, iconNode: IconNode): LucideIcon => {
|
||||
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
||||
`lucide-${toKebabCase(iconName)}`,
|
||||
classes,
|
||||
className,
|
||||
),
|
||||
},
|
||||
children,
|
||||
|
||||
Reference in New Issue
Block a user