UNPKG

v-simple-icons

Version:

Simply beautiful open source icons as Vue functional components.

32 lines 1.48 kB
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props"; export default { name: 'MojangIcon', 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", ["Mojang icon"]), h("path", { attrs: { d: "M6.912 0A6.913 6.913 0 000 6.912V24h17.088A6.912 6.912 0 0024 17.088V0h-4.992zm10.111 2.594c.566 0 1.024 2.505 1.024 3.07a1.024 1.024 0 11-2.047 0c0-.565.459-3.07 1.023-3.07zM14.41 5.498c.69.19 2.082 3.77 3.637 2.215 1.448-1.448 2.049 7.164 2.049 7.164l-2.05-1.022s.002-2.048-3.07-4.095c-3.809-2.54-8.189-.867-8.189 3.07 0 8.033 13.309 5.12 13.309 5.12s-.002 2.046-2.05 2.046H5.765c-2.047 0-2.05-2.047-2.05-2.047V7.713c0-2.048 2.05-2.049 2.05-2.049h4.093c2.048 0 4.096 2.049 4.096 2.049 0-1.49.117-2.098.328-2.205a.175.175 0 01.13-.01z" } })]); } };