v-simple-icons
Version:
Simply beautiful open source icons as Vue functional components.
32 lines • 1.36 kB
JavaScript
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props";
export default {
name: 'WpEngineIcon',
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", ["WP Engine icon"]), h("path", {
attrs: {
d: "M8.1 24h7.8v-5.85l-1.95-1.801h-3.9L8.1 18.15V24zM18.15 8.1l-1.801 1.95v3.9l1.801 1.95H24V8.1h-5.85zM15.9 0H8.1v5.85l1.95 1.801h3.9L15.9 5.85V0zM24 24v-5.85l-1.801-1.801h-5.85V24H24zM1.8 0L0 1.8v5.85h7.65V0H1.8zm14.55 0v5.85l1.8 1.8H24V0h-7.65zM12 13.05c-.6 0-1.05-.45-1.05-1.05s.45-1.05 1.05-1.05 1.05.45 1.05 1.05-.45 1.05-1.05 1.05m-4.35 5.1l-1.8-1.8H0V24h5.85l1.801-1.801V18.15zm0-10.05H0v7.8h5.85l1.801-1.95V8.1z"
}
})]);
}
};