mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-16 15:57: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
|
* @returns {FunctionComponent} LucideIcon
|
||||||
*/
|
*/
|
||||||
const createLucideIcon = (iconName: string, iconNode: IconNode): LucideIcon => {
|
const createLucideIcon = (iconName: string, iconNode: IconNode): LucideIcon => {
|
||||||
const Component = ({ class: classes = '', children, ...props }: LucideProps) =>
|
const Component = ({ class: classes = '', className = '', children, ...props }: LucideProps) =>
|
||||||
h(
|
h(
|
||||||
Icon,
|
Icon,
|
||||||
{
|
{
|
||||||
@@ -20,6 +20,7 @@ const createLucideIcon = (iconName: string, iconNode: IconNode): LucideIcon => {
|
|||||||
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
||||||
`lucide-${toKebabCase(iconName)}`,
|
`lucide-${toKebabCase(iconName)}`,
|
||||||
classes,
|
classes,
|
||||||
|
className,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
children,
|
children,
|
||||||
|
|||||||
Reference in New Issue
Block a user