v-simple-icons
Version:
Simply beautiful open source icons as Vue functional components.
32 lines • 1.25 kB
JavaScript
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props";
export default {
name: 'DigitalOceanIcon',
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", ["DigitalOcean icon"]), h("path", {
attrs: {
d: "M.836 19.365H.832V16.38h2.985v2.985H7.38V14.73h4.635v4.62c4.927-.006 8.73-4.883 6.852-10.066-.698-1.92-2.23-3.45-4.15-4.146C9.527 3.255 4.647 7.068 4.647 12H0C0 4.144 7.59-1.976 15.824.595c3.6 1.125 6.456 3.982 7.58 7.58C25.974 16.41 19.858 24 12 24v-4.635H7.377v3.56h-3.56v-3.56H.833h.002z"
}
})]);
}
};