UNPKG

vue-sailor-icons

Version:

Nice open source icons as Vue functional components.

44 lines 1.61 kB
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props"; export default { name: 'SearchIcon', 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'; } }, color: { type: String, default: '#000' } }, 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: { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" }, "class": "sailor sailor-search" }, ctx.data]), [h("path", { attrs: { d: "M19.6 18.59l-4-4a6.41 6.41 0 1 0-1 1l4 4a.74.74 0 0 0 1 0 .73.73 0 0 0 0-1zm-9-3a5 5 0 1 1 5-5 5 5 0 0 1-5.02 4.96z", fill: ctx.props.color } }), h("path", { attrs: { d: "M19.1 20a.85.85 0 0 1-.64-.27l-3.91-3.9a6.57 6.57 0 1 1 1.28-1.28l3.91 3.91A.91.91 0 0 1 19.1 20zm-4.52-4.69l4.15 4.15a.54.54 0 0 0 .73 0 .51.51 0 0 0 .15-.36.51.51 0 0 0-.15-.37l-4.15-4.15.11-.14a6.19 6.19 0 1 0-1 1zm-4 .43a5.16 5.16 0 1 1 5.16-5.16 5.16 5.16 0 0 1-5.16 5.16zm0-9.93a4.77 4.77 0 1 0 4.77 4.77 4.78 4.78 0 0 0-4.77-4.77z", fill: ctx.props.color } })]); } };