UNPKG

vue-sailor-icons

Version:

Nice open source icons as Vue functional components.

44 lines 1.49 kB
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props"; export default { name: 'FileIcon', 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-file" }, ctx.data]), [h("path", { attrs: { d: "M17.59 20H6.32a1 1 0 0 1-1-1V4.88A.88.88 0 0 1 6.21 4h7a.69.69 0 0 1 .7.69.7.7 0 0 1-.7.7H6.72V18.6h10.56V9.17a.7.7 0 0 1 1.39 0v9.75A1.08 1.08 0 0 1 17.59 20z", fill: ctx.props.color } }), h("path", { attrs: { d: "M13.6 9.82a.91.91 0 0 1-.6-.25 1 1 0 0 1-.27-.75V5a.79.79 0 0 1 .44-.79.76.76 0 0 1 .83.19l4.25 4a.82.82 0 0 1 .23.9.83.83 0 0 1-.8.51h-4.06zm3.69-.42zm-3.2-3v2h2.15zm3.57 2zM13.48 5z", fill: ctx.props.color } })]); } };