vue-sailor-icons
Version:
Nice open source icons as Vue functional components.
54 lines • 1.82 kB
JavaScript
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props";
export default {
name: 'FolderIcon',
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-folder"
}, ctx.data]), [h("path", {
attrs: {
d: "M17.93 9a.37.37 0 0 1-.38-.37V7h-5.84a.38.38 0 1 1 0-.75h6.22a.38.38 0 0 1 .38.37v2.05a.37.37 0 0 1-.38.33z",
fill: ctx.props.color
}
}), h("path", {
attrs: {
d: "M13.69 15.66H6.93a.38.38 0 0 1 0-.76h6.76a.38.38 0 1 1 0 .76z",
fill: ctx.props.color
}
}), h("path", {
attrs: {
d: "M10.8 14.38H6.93a.38.38 0 0 1 0-.76h3.87a.38.38 0 0 1 0 .76z",
fill: ctx.props.color
}
}), h("path", {
attrs: {
d: "M17.65 18.31H4.47a.47.47 0 0 1-.47-.47V6.16a.47.47 0 0 1 .47-.47h6.66a.47.47 0 0 1 .42.26l1.11 2.25h6.87a.47.47 0 0 1 .47.47V16a2.34 2.34 0 0 1-2.35 2.35zm-12.71-.94h12.71a1.37 1.37 0 0 0 1-.41 1.4 1.4 0 0 0 .42-1V9.14h-6.7a.47.47 0 0 1-.42-.26l-1.1-2.25H4.94z",
fill: ctx.props.color
}
})]);
}
};