v-simple-icons
Version:
Simply beautiful open source icons as Vue functional components.
32 lines • 1.48 kB
JavaScript
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props";
export default {
name: 'KnownIcon',
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",
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24"
}
}, ctx.data]), [h("title", ["Known icon"]), h("path", {
attrs: {
d: "M24 12c0 6.6-5.4 12-12 12S0 18.6 0 12 5.4 0 12 0s12 5.4 12 12zM12 1.8C6.3 1.8 1.8 6.3 1.8 12S6.3 22.2 12 22.2 22.2 17.7 22.2 12 17.7 1.8 12 1.8zm5.6 5.4l-.2.2c.1-.1.3-.2.4-.2h-.2zm.2 0h.5V5.3h-5.5v1.9h.9c.2 0 .3.1.3.3 0 .1 0 .2-.1.2l-3.8 3.8H10c-.1 0-.2-.1-.2-.2V7.9c0-.4.3-.7.7-.7h.8V5.3H5.4v1.9h.7c.4 0 .7.3.7.7v8.4c0 .4-.3.7-.7.7h-.7v2h5.9v-2h-.8c-.4 0-.7-.3-.7-.7v-1.4c0-.1 0-.2.1-.3l1.5-1.5s.1-.1.2-.1.2 0 .2.1l2.1 3.3v.2c0 .2-.1.3-.3.3h-.9v2H19v-2h-.7c-.2 0-.4-.1-.5-.3v-.1L14.1 11c0-.1-.1-.1-.1-.2s0-.2.1-.2l3.2-3.2c.2-.2.3-.2.5-.2z"
}
})]);
}
};