v-simple-icons
Version:
Simply beautiful open source icons as Vue functional components.
32 lines • 1.51 kB
JavaScript
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props";
export default {
name: 'CodeFactorIcon',
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", ["CodeFactor icon"]), h("path", {
attrs: {
d: "M5.37 2.65A2.64 2.64 0 0 1 2.75 5.3 2.64 2.64 0 0 1 .12 2.65 2.64 2.64 0 0 1 2.75 0a2.64 2.64 0 0 1 2.62 2.65zm0 9.35a2.64 2.64 0 0 1-2.62 2.65A2.64 2.64 0 0 1 .12 12a2.64 2.64 0 0 1 2.63-2.65A2.64 2.64 0 0 1 5.37 12zm0 9.35A2.64 2.64 0 0 1 2.75 24a2.64 2.64 0 0 1-2.63-2.65 2.64 2.64 0 0 1 2.63-2.65 2.64 2.64 0 0 1 2.62 2.65zM11.31 0A2.64 2.64 0 0 0 8.7 2.65 2.64 2.64 0 0 0 11.3 5.3h9.94a2.64 2.64 0 0 0 2.63-2.65A2.64 2.64 0 0 0 21.25 0h-9.94zM8.7 12a2.64 2.64 0 0 1 2.62-2.65H17A2.64 2.64 0 0 1 19.6 12 2.64 2.64 0 0 1 17 14.65H11.3A2.64 2.64 0 0 1 8.7 12z"
}
})]);
}
};