vue-sailor-icons
Version:
Nice open source icons as Vue functional components.
49 lines • 1.51 kB
JavaScript
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props";
export default {
name: 'SailMenuIcon',
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-sail-menu"
}, ctx.data]), [h("path", {
attrs: {
d: "M19.27 20H4.73a.73.73 0 0 1-.73-.73.73.73 0 0 1 .73-.72h14.54a.73.73 0 0 1 .73.72.73.73 0 0 1-.73.73z",
fill: ctx.props.color
}
}), h("path", {
attrs: {
d: "M19.27 12.71H8.36a.73.73 0 0 1 0-1.46h10.91a.73.73 0 0 1 0 1.46z",
fill: ctx.props.color
}
}), h("path", {
attrs: {
d: "M19.27 5.45H12a.73.73 0 0 1-.73-.72A.73.73 0 0 1 12 4h7.27a.73.73 0 0 1 .73.73.73.73 0 0 1-.73.72z",
fill: ctx.props.color
}
})]);
}
};