v-simple-icons
Version:
Simply beautiful open source icons as Vue functional components.
32 lines • 1.17 kB
JavaScript
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props";
export default {
name: 'GitpodIcon',
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",
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg"
}
}, ctx.data]), [h("title", ["Gitpod icon"]), h("path", {
attrs: {
d: "M3.6 17V7.6L1.5 6.4v11.8L11.7 24v-2.4z M11.7 19.2v-6.9l-6-3.5v7zM12 2.4l8.1 4.7 2.1-1.2L12 0 1.8 5.9l2.1 1.2z M18 8.3l-6-3.5-6 3.5 6 3.5zM12.3 19.3l6-3.5v-2.4l-4.1 2.4v-2.4l6.2-3.6V17l-8.1 4.6V24l10.2-5.8V6.4l-10.2 5.9zM12 12.1z"
}
})]);
}
};