v-simple-icons
Version:
Simply beautiful open source icons as Vue functional components.
32 lines • 1.24 kB
JavaScript
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props";
export default {
name: 'EnvatoIcon',
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", ["Envato icon"]), h("path", {
attrs: {
d: "M19.4.197c-.74-.371-2.721-.247-5.195.62-4.207 2.968-7.674 7.175-8.044 14.109 0 .241-.493 0-.617-.126-1.114-2.104-1.61-4.455-.62-7.921.247-.247-.37-.617-.37-.494-.249.123-1.114 1.113-1.734 2.103-2.847 4.947-.99 11.511 3.961 14.231 4.947 2.721 11.382.988 14.231-4.086 3.342-5.814.369-17.322-1.612-18.436"
}
})]);
}
};