UNPKG

v-simple-icons

Version:

Simply beautiful open source icons as Vue functional components.

32 lines 1.18 kB
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props"; export default { name: 'KloutIcon', 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", ["Klout icon"]), h("path", { attrs: { d: "M0 2.673v14.72h16.17L24 21.327V2.673H0zm9.827 8.42h-1.17l-2.88 4.054H2.35l3.94-5.265-3.638-5.07h3.336l2.66 3.885h1.18v2.397zm8.407 4.053l-2.88-4.053h-1.966v4.053h-2.73V4.812h2.734v3.885h1.965l2.658-3.885h3.33l-3.636 5.07 3.94 5.265h-3.416z" } })]); } };