Initial commit
This commit is contained in:
commit
89053153cc
8152 files changed
+2086461
No files matched your search
+30
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @license lucide-react v1.45.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import { forwardRef, createElement } from 'react';
|
||||
import { toLucideIconData } from './shared/src/utils/toLucideIconData.mjs';
|
||||
import { toPascalCase } from './shared/src/utils/toPascalCase.mjs';
|
||||
import Icon from './Icon.mjs';
|
||||
|
||||
function createLucideIcon(iconDataOrName, iconNode = [], aliases = []) {
|
||||
const iconData = typeof iconDataOrName === "string" ? toLucideIconData(iconDataOrName, iconNode, aliases) : iconDataOrName;
|
||||
const Component = forwardRef(
|
||||
({ className, ...props }, ref) => createElement(Icon, {
|
||||
ref,
|
||||
icon: iconData,
|
||||
className,
|
||||
...props
|
||||
})
|
||||
);
|
||||
if (iconData.name) {
|
||||
Component.displayName = toPascalCase(iconData.name);
|
||||
}
|
||||
return Component;
|
||||
}
|
||||
|
||||
export { createLucideIcon as default };
|
||||
//# sourceMappingURL=createLucideIcon.mjs.map
|
||||
Reference in new issue
Block a user