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: 'BoostIcon',
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", ["Boost icon"]), h("path", {
attrs: {
d: "M15.818 18.157c.058-.045.112-.099.163-.15a2.28 2.28 0 0 0 0-3.169l-7.802-8c-.054.05-.109.099-.16.152a2.278 2.278 0 0 0 0 3.17l7.799 7.997zm5.727-11.399a2.957 2.957 0 0 1 1.573.873c1.176 1.24 1.176 3.25 0 4.49l-5.557 5.847a2.145 2.145 0 0 1-1.298.637L19.567 22l-17.11-3.758a2.998 2.998 0 0 1-1.572-.878c-1.18-1.237-1.18-3.248 0-4.494l5.552-5.838a2.129 2.129 0 0 1 1.303-.643L4.434 3l17.11 3.758z"
}
})]);
}
};