v-simple-icons
Version:
Simply beautiful open source icons as Vue functional components.
32 lines • 1.39 kB
JavaScript
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props";
export default {
name: 'QiIcon',
props: {
size: {
type: String,
default: '24',
validator: function validator(s) {
return !isNaN(s) || s.length >= 2 && !isNaN(s.slice(0, s.length - 1)) && s.slice(-1) === 'x';
}
}
},
functional: true,
render: function render(h, ctx) {
var size = ctx.props.size.slice(-1) === 'x' ? ctx.props.size.slice(0, ctx.props.size.length - 1) + 'em' : parseInt(ctx.props.size) + 'px';
var attrs = ctx.data.attrs || {};
attrs.width = attrs.width || size;
attrs.height = attrs.height || size;
ctx.data.attrs = attrs;
return h("svg", _mergeJSXProps([{
attrs: {
role: "img",
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24"
}
}, ctx.data]), [h("title", ["Qi icon"]), h("path", {
attrs: {
d: "M16.574 0a1.524 1.524 0 100 3.049 1.524 1.524 0 100-3.049zm-4.762 2.857a7.627 7.627 0 00-.01 15.246c.297 0 .296.293.296.293v2.65s.001 2.763 2.658 2.954c.295.01.295-.295.295-.295V3.785s0-.293-.295-.414a7.667 7.667 0 00-2.944-.514zM16.7 4.52c-.124-.02-.123.167-.123.386v11.147c0 .294-.002.528.293.297.01-.01.023-.019.033-.028a7.626 7.626 0 00-.03-11.709.41.41 0 00-.173-.093zm-4.765 1.386c.165 0 .164.164.164.164v8.82s0 .165-.164.165a4.577 4.577 0 010-9.148Z"
}
})]);
}
};