UNPKG

v-simple-icons

Version:

Simply beautiful open source icons as Vue functional components.

32 lines 1.47 kB
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props"; export default { name: 'AsciidoctorIcon', 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", ["Asciidoctor icon"]), h("path", { attrs: { d: "M18.07,0H5.93A5.94,5.94,0,0,0,0,5.93V18.07A5.94,5.94,0,0,0,5.93,24H18.07A5.94,5.94,0,0,0,24,18.07V5.93A5.94,5.94,0,0,0,18.07,0ZM10.71,15.4H8.81v0L7.2,19.28h0a.5.5,0,0,1-.66.27.51.51,0,0,1-.27-.67L7.72,15.4H4.85a.5.5,0,0,1-.5-.51.52.52,0,0,1,.52-.5h5.86a.5.5,0,0,1,.49.52A.49.49,0,0,1,10.71,15.4Zm7.92,4.17a.51.51,0,0,1-.66-.29l-5.35-13L10.23,12H11.8a.5.5,0,0,1,.49.52.49.49,0,0,1-.51.49H5.92a.5.5,0,0,1-.5-.51.52.52,0,0,1,.52-.5h3.2l3-7.27a.49.49,0,0,1,.45-.31.52.52,0,0,1,.48.31L18.91,18.9h0A.51.51,0,0,1,18.63,19.57Z" } })]); } };