v-simple-icons
Version:
Simply beautiful open source icons as Vue functional components.
32 lines • 1.33 kB
JavaScript
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props";
export default {
name: 'MercedesIcon',
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", ["Mercedes icon"]), h("path", {
attrs: {
d: "M12.005 0c6.623 0 12 5.377 12 12s-5.377 12-12 12-12-5.377-12-12 5.377-12 12-12zM3.25 17.539a10.357 10.357 0 0 0 8.755 4.821c3.681 0 6.917-1.924 8.755-4.821l-8.755-3.336-8.755 3.336zm10.663-6.641l7.267 5.915A10.306 10.306 0 0 0 22.365 12c0-5.577-4.417-10.131-9.94-10.352l1.488 9.25zm-2.328-9.25C6.062 1.869 1.645 6.423 1.645 12c0 1.737.428 3.374 1.185 4.813l7.267-5.915 1.488-9.25z"
}
})]);
}
};