@meistericons/vue
Version:
Vue icon library for meistericons.
49 lines (45 loc) • 1.21 kB
JavaScript
/**
* @license @meistericons/vue v0.5.1 - ISC
* The source code is licensed under the ISC license.
* See the root directory for the LICENSE file.
*/
import defaultAttributes from './defaultAttributes.js';
var createMeisterIcons = (iconName, iconNode) => ({
name: iconName,
functional: true,
props: {
color: { type: String, default: "currentColor" },
size: { type: Number, default: 24 }
},
render: (createElement, { props: { color, size }, data, children = [] }) => {
return createElement(
"svg",
{
class: [
data.class,
data.staticClass,
data.attrs && data.attrs.class
].filter(Boolean),
style: [
data.style,
data.staticStyle,
data.attrs && data.attrs.style
].filter(Boolean),
attrs: {
...defaultAttributes,
width: size,
height: size,
color,
...data.attrs
},
on: data?.on || {}
},
[
...iconNode.map(([tag, attrs]) => createElement(tag, { attrs })),
...children
]
);
}
});
export { createMeisterIcons as default };
//# sourceMappingURL=createMeisterIcons.js.map