vue-sailor-icons
Version:
Nice open source icons as Vue functional components.
44 lines • 1.46 kB
JavaScript
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props";
export default {
name: 'MessageIcon',
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-message"
}, ctx.data]), [h("path", {
attrs: {
d: "M19 7v10H5.67V7H19m.67-1.33H5.14a.79.79 0 0 0-.8.8v11.06a.79.79 0 0 0 .8.8h14.4a.8.8 0 0 0 .8-.8V6.33a.67.67 0 0 0-.67-.66z",
fill: ctx.props.color
}
}), h("path", {
attrs: {
d: "M18.93 7l-6.59 4.4L5.74 7h13.19m.74-1.33H5.13a.79.79 0 0 0-.79.8v.77a.78.78 0 0 0 .35.66L12 12.75a.63.63 0 0 0 .37.12.68.68 0 0 0 .37-.12l7.63-5.08V6.33a.67.67 0 0 0-.67-.66z",
fill: ctx.props.color
}
})]);
}
};