UNPKG

v-simple-icons

Version:

Simply beautiful open source icons as Vue functional components.

32 lines 1.79 kB
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props"; export default { name: 'GeniusIcon', 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", ["Genius icon"]), h("path", { attrs: { d: "M12.897 1.235c-.36.001-.722.013-1.08.017-.218-.028-.371.225-.352.416-.035 1.012.023 2.025-.016 3.036-.037.841-.555 1.596-1.224 2.08-.5.345-1.118.435-1.671.663.121.78.434 1.556 1.057 2.07 1.189 1.053 3.224.86 4.17-.426.945-1.071.453-2.573.603-3.854.286-.48.937-.132 1.317-.49-.34-1.249-.81-2.529-1.725-3.472a11.125 11.125 0 00-1.08-.04zm-10.42.006C.53 2.992-.386 5.797.154 8.361c.384 2.052 1.682 3.893 3.45 4.997.134-.23.23-.476.09-.73-.95-2.814-.138-6.119 1.986-8.19.014-.986.043-1.976-.003-2.961l-.188-.214c-1.003-.051-2.008 0-3.01-.022zm17.88.055l-.205.356c.265.938.6 1.862.72 2.834.58 3.546-.402 7.313-2.614 10.14-1.816 2.353-4.441 4.074-7.334 4.773-2.66.66-5.514.45-8.064-.543-.068.079-.207.237-.275.318 2.664 2.629 6.543 3.969 10.259 3.498 3.075-.327 5.995-1.865 8.023-4.195 1.935-2.187 3.083-5.07 3.125-7.992.122-3.384-1.207-6.819-3.636-9.19z" } })]); } };