v-simple-icons
Version:
Simply beautiful open source icons as Vue functional components.
32 lines • 1.31 kB
JavaScript
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props";
export default {
name: 'ZalandoIcon',
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", ["Zalando icon"]), h("path", {
attrs: {
d: "M4.78 24c-.88 0-1.36-.2-1.62-.36-.36-.21-1.02-.75-1.62-2.33A27.06 27.06 0 0 1 0 12V12c.02-3.66.59-6.76 1.54-9.3C2.14 1.1 2.8.56 3.16.35 3.42.21 3.9 0 4.78 0c.33 0 .72.03 1.18.1a26.1 26.1 0 0 1 8.7 3.3h.01a26.4 26.4 0 0 1 7.16 6.01c1.06 1.32 1.19 2.17 1.19 2.59 0 .42-.13 1.27-1.19 2.59a26.4 26.4 0 0 1-7.16 6h-.01a26.03 26.03 0 0 1-8.7 3.3c-.46.08-.85.11-1.18.11z"
}
})]);
}
};