v-simple-icons
Version:
Simply beautiful open source icons as Vue functional components.
32 lines • 1.41 kB
JavaScript
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props";
export default {
name: 'SparkFunIcon',
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", ["SparkFun icon"]), h("path", {
attrs: {
d: "M17.805 3.852s.34 1.441-.746 1.64c-.754.133-1.973-.617-2.586-1.363-.758-.922-.66-1.649-.075-2.29.883-.98 2.399-.6 2.399-.6s-2.774-2.43-5.66-.438c-2.57 1.77-1.832 4.18.488 6.285 2.09 1.902.422 3.988-1.688 3.719-1.44-.184-2.03-1.344-1.687-2.055.3-.61 1.336-.984 1.336-.984s-1.191-.48-2.59.046c-1.262.473-2.297 1.512-2.215 4.122v12.078s1.301-1.602 2.832-3.235c1.711-1.84 2.492-3.082 4.25-2.937 3.328.207 5.735-1.274 7.371-3.645 3.141-4.562.68-9.66-1.43-10.343zm0 0"
}
})]);
}
};