v-simple-icons
Version:
Simply beautiful open source icons as Vue functional components.
32 lines • 1.27 kB
JavaScript
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props";
export default {
name: 'DTubeIcon',
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", ["DTube icon"]), h("path", {
attrs: {
d: "M22.6 5.5a9.91 9.91 0 0 0-3.88-4.04A11.18 11.18 0 0 0 13.08.04H.18l6.91 4h5.99c1.94 0 3.41.62 4.42 1.88C18.5 7.17 19 9 19 11.43v1.27c-.01 2.34-.53 4.14-1.55 5.4-1.02 1.26-2.5 1.89-4.42 1.89H6.86L0 23.95h13.13c2.09 0 3.97-.49 5.63-1.44 1.66-.95 2.95-2.3 3.87-4.02S24 14.79 24 12.56v-1.1c0-2.22-.47-4.2-1.4-5.96zM.13 3.96v16.1L14.07 12z"
}
})]);
}
};