vue-sailor-icons
Version:
Nice open source icons as Vue functional components.
49 lines • 1.66 kB
JavaScript
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props";
export default {
name: 'DownloadIcon',
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-download"
}, ctx.data]), [h("path", {
attrs: {
d: "M19.27 20H4.73a.73.73 0 0 1-.73-.73V15.5a.73.73 0 0 1 .73-.73.72.72 0 0 1 .72.73v3.05h13.1V15.5a.72.72 0 0 1 .72-.73.73.73 0 0 1 .73.73v3.77a.73.73 0 0 1-.73.73z",
fill: ctx.props.color
}
}), h("path", {
attrs: {
d: "M12 16a.72.72 0 0 1-.72-.73V4.69A.73.73 0 0 1 12 4a.73.73 0 0 1 .73.73v8.94L17 9.84a.73.73 0 1 1 1 1.08l-5.5 4.93a.74.74 0 0 1-.5.15z",
fill: ctx.props.color
}
}), h("path", {
attrs: {
d: "M12 16a.72.72 0 0 1-.49-.19l-5.4-4.91a.73.73 0 0 1 0-1 .72.72 0 0 1 1-.05l5.41 4.92a.73.73 0 0 1 .05 1A.74.74 0 0 1 12 16z",
fill: ctx.props.color
}
})]);
}
};