UNPKG

lucide-vue-next

Version:

A Lucide icon library package for Vue 3 applications.

33 lines (29 loc) 1.12 kB
/** * @license lucide-vue-next v0.516.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ import { h } from 'vue'; import { mergeClasses, toKebabCase, toPascalCase } from './shared/src/utils.js'; import defaultAttributes from './defaultAttributes.js'; const Icon = ({ size, strokeWidth = 2, absoluteStrokeWidth, color, iconNode, name, class: classes, ...props }, { slots }) => { return h( "svg", { ...defaultAttributes, width: size || defaultAttributes.width, height: size || defaultAttributes.height, stroke: color || defaultAttributes.stroke, "stroke-width": absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth, class: mergeClasses( "lucide", ...name ? [`lucide-${toKebabCase(toPascalCase(name))}-icon`, `lucide-${toKebabCase(name)}`] : ["lucide-icon"] ), ...props }, [...iconNode.map((child) => h(...child)), ...slots.default ? [slots.default()] : []] ); }; export { Icon as default }; //# sourceMappingURL=Icon.js.map