UNPKG

v-simple-icons

Version:

Simply beautiful open source icons as Vue functional components.

32 lines 1.67 kB
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props"; export default { name: 'SauceLabsIcon', 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", ["Sauce Labs icon"]), h("path", { attrs: { d: "M2.93 15.475l6.396.004-3.582 6.758C2.178 20.057.002 16.18 0 12 0 5.383 5.383 0 12 0c1.761 0 3.436.381 4.94 1.064L5.428 12.58h10.25l-7.539 7.614 3.115-5.876H3.795C3.455 13.164 3.477 12 3.477 12c.006-4.713 3.831-8.529 8.544-8.523.093 0 .187.002.28.005l1.094-1.099c-.455-.065-.915-.098-1.375-.098-5.356 0-9.73 4.357-9.73 9.715-.001 0-.061 1.719.64 3.475zM18.255 1.764C21.82 3.943 23.997 7.82 24 12c0 6.616-5.384 12-12 12-1.704.003-3.389-.36-4.941-1.065l11.426-11.513H8.205l7.656-7.616-3.115 5.876h7.46c.319 1.079.319 2.318.319 2.318-.008 4.714-3.834 8.529-8.547 8.522-.105 0-.21-.002-.314-.006l-1.084 1.096c5.314.777 10.256-2.901 11.032-8.218.067-.461.103-.928.103-1.395 0-1.189-.22-2.369-.647-3.479h-6.394l3.581-6.756z" } })]); } };