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: 'SketchIcon',
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", ["Sketch icon"]), h("path", {
attrs: {
d: "M12 1.25l6.75 6.637V2L12 1.25zm0 0l-6.05 7h12.1l-6.05-7zm0 0L5.25 2v5.887L12 1.25zM5.25 2L0 9l4.416-.68L5.25 2zM0 9l11.959 13.703.008-.014L4.443 9H0zm18.75-7l.834 6.32L24 9l-5.25-7zM24 9h-4.506l-7.523 13.69.029.06L24 9zM12 22.75l-.031-.057-.008.012.039.045zM5.436 9l6.533 13.686L18.564 9H5.436Z"
}
})]);
}
};