mirror of
https://github.com/mivodev/mivodev.github.io.git
synced 2026-01-26 21:41:53 +07:00
44 lines
1.4 KiB
JavaScript
44 lines
1.4 KiB
JavaScript
/**
|
|
* @license lucide-vue-next v0.562.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, isEmptyString } from './shared/src/utils.js';
|
|
import defaultAttributes from './defaultAttributes.js';
|
|
|
|
const Icon = ({
|
|
name,
|
|
iconNode,
|
|
absoluteStrokeWidth,
|
|
"absolute-stroke-width": absoluteStrokeWidthKebabCase,
|
|
strokeWidth,
|
|
"stroke-width": strokeWidthKebabCase,
|
|
size = defaultAttributes.width,
|
|
color = defaultAttributes.stroke,
|
|
...props
|
|
}, { slots }) => {
|
|
return h(
|
|
"svg",
|
|
{
|
|
...defaultAttributes,
|
|
...props,
|
|
width: size,
|
|
height: size,
|
|
stroke: color,
|
|
"stroke-width": isEmptyString(absoluteStrokeWidth) || isEmptyString(absoluteStrokeWidthKebabCase) || absoluteStrokeWidth === true || absoluteStrokeWidthKebabCase === true ? Number(strokeWidth || strokeWidthKebabCase || defaultAttributes["stroke-width"]) * 24 / Number(size) : strokeWidth || strokeWidthKebabCase || defaultAttributes["stroke-width"],
|
|
class: mergeClasses(
|
|
"lucide",
|
|
props.class,
|
|
...name ? [`lucide-${toKebabCase(toPascalCase(name))}-icon`, `lucide-${toKebabCase(name)}`] : ["lucide-icon"]
|
|
)
|
|
},
|
|
[...iconNode.map((child) => h(...child)), ...slots.default ? [slots.default()] : []]
|
|
);
|
|
};
|
|
|
|
export { Icon as default };
|
|
//# sourceMappingURL=Icon.js.map
|