vue-sailor-icons
Version:
Nice open source icons as Vue functional components.
49 lines • 1.82 kB
JavaScript
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props";
export default {
name: 'ProfileIcon',
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-profile"
}, ctx.data]), [h("path", {
attrs: {
d: "M12 14.11a3.76 3.76 0 0 1-3.68-3.84V7.84A3.76 3.76 0 0 1 12 4a3.76 3.76 0 0 1 3.68 3.84v2.43A3.76 3.76 0 0 1 12 14.11zm0-8.64a2.3 2.3 0 0 0-2.23 2.37v2.43A2.31 2.31 0 0 0 12 12.65a2.31 2.31 0 0 0 2.23-2.38V7.84A2.3 2.3 0 0 0 12 5.47z",
fill: ctx.props.color
}
}), h("path", {
attrs: {
d: "M19.27 20H4.73a.73.73 0 0 1-.73-.73V18c0-1.19 2-2.29 5.94-3.24v-.86a.73.73 0 1 1 1.45 0v1.4a.74.74 0 0 1-.57.72c-2.54.57-5 1.5-5.37 2v.51h13.82a.74.74 0 0 1 0 1.47zM5.45 17.94z",
fill: ctx.props.color
}
}), h("path", {
attrs: {
d: "M19.27 20a.73.73 0 0 1-.72-.73V18c-.37-.51-2.83-1.43-5.37-2a.74.74 0 0 1-.55-.88.72.72 0 0 1 .87-.55c4.35 1 6.54 2.12 6.5 3.39v1.29a.73.73 0 0 1-.73.75zm-.7-1.95zm0-.09z",
fill: ctx.props.color
}
})]);
}
};