v-simple-icons
Version:
Simply beautiful open source icons as Vue functional components.
32 lines • 1.86 kB
JavaScript
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props";
export default {
name: 'AdobeXdIcon',
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", ["Adobe XD icon"]), h("path", {
attrs: {
d: "M19.75.3H4.25C1.9.3 0 2.2 0 4.55v14.9c0 2.35 1.9 4.25 4.25 4.25h15.5c2.35 0 4.25-1.9 4.25-4.25V4.55C24 2.2 22.1.3 19.75.3zm3.24 18.76a3.623 3.623 0 0 1-3.62 3.64H4.63c-2 0-3.63-1.63-3.63-3.63V4.93c0-2 1.63-3.63 3.63-3.63h14.73a3.63 3.63 0 0 1 3.63 3.63v14.13zm-13.5-7.81l2.8 5.38c.05.08.02.16-.06.16h-1.74c-.11 0-.16-.03-.21-.13-.64-1.32-1.29-2.64-1.96-4.06H8.3c-.6 1.34-1.26 2.75-1.9 4.07-.05.08-.1.11-.18.11H4.57c-.1 0-.11-.08-.06-.14l2.74-5.22L4.6 6.14c-.06-.08 0-.14.06-.14h1.72c.1 0 .14.02.18.11.63 1.32 1.27 2.68 1.87 4.01h.02c.58-1.32 1.22-2.69 1.84-4 .05-.08.08-.13.18-.13h1.61c.08 0 .11.06.06.14l-2.65 5.12zm3.29 1.63c0-2.33 1.55-4.15 4.01-4.15.21 0 .32 0 .52.02V6.1c0-.06.05-.1.1-.1h1.58c.08 0 .1.03.1.08v9.18c0 .27 0 .61.05.98 0 .06-.02.08-.08.11-.84.4-1.72.58-2.56.58-2.17.01-3.72-1.33-3.72-4.05zm4.53-2.56c-.14-.06-.34-.1-.58-.1-1.26 0-2.14.97-2.14 2.58 0 1.84.9 2.58 2.03 2.58.24 0 .5-.03.69-.11v-4.95z"
}
})]);
}
};