vue-sailor-icons
Version:
Nice open source icons as Vue functional components.
57 lines • 1.85 kB
JavaScript
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props";
export default {
name: 'BoatIcon',
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-boat"
}, ctx.data]), [h("path", {
attrs: {
d: "M12 20a7.47 7.47 0 0 1-7-4.85.43.43 0 0 1 0-.4.42.42 0 0 1 .36-.19h13.2a.42.42 0 0 1 .36.19.43.43 0 0 1 0 .4A7.47 7.47 0 0 1 12 20zm-5.9-4.57a6.56 6.56 0 0 0 11.8 0z",
fill: ctx.props.color
}
}), h("rect", {
attrs: {
x: "11.56",
y: "9.37",
width: ".88",
height: "5.64",
fill: ctx.props.color
}
}), h("path", {
attrs: {
d: "M12 14.09H8.3a.44.44 0 0 1-.39-.23.43.43 0 0 1 0-.45l3.71-5.55a.44.44 0 0 1 .49-.18.45.45 0 0 1 .31.42v5.55a.44.44 0 0 1-.42.44zm-2.89-.88h2.45V9.55z",
fill: ctx.props.color
}
}), h("path", {
attrs: {
d: "M18 13.45h-5.83a.44.44 0 0 1-.44-.44V4.44A.45.45 0 0 1 12 4a.43.43 0 0 1 .49.17l5.79 8.58a.43.43 0 0 1-.36.68zm-5.35-.87h4.52l-4.56-6.71z",
fill: ctx.props.color
}
})]);
}
};