UNPKG

v-simple-icons

Version:

Simply beautiful open source icons as Vue functional components.

32 lines 2 kB
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props"; export default { name: 'UdacityIcon', 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'; } } }, 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: { role: "img", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" } }, ctx.data]), [h("title", ["Udacity icon"]), h("path", { attrs: { d: "M8.01.138L0 4.68v10.458c-.015 4.803 3.915 8.71 8.775 8.725 1.604.004 3.115-.418 4.414-1.154l6.487-3.686c2.561-1.306 4.313-3.946 4.323-6.991V1.096L22.409.18l-6.503 3.631v11.373c-.003.482-.025.836-.153 1.435-.216.915-.521 1.561-.574 1.665-.511-.03-1.546-.314-2.386-.81-.42-.24-.914-.601-1.364-1.021-.3-.285-.556-.615-.78-.945-.24-.345-.435-.704-.585-1.079-.165-.391-.284-.78-.375-1.185-.09-.421-.104-.855-.104-1.275L9.6 1.051 8.01.143V.138zm3.687 21.583c-.436.179-.889.316-1.35.41-.477.094-.916.141-1.403.141-.488 0-.978-.053-1.452-.151-.461-.092-.915-.234-1.35-.417-.424-.179-.836-.404-1.219-.659-.99-.691-1.5-1.291-1.941-1.936-.26-.39-.48-.795-.66-1.215-.183-.435-.322-.886-.416-1.335-.09-.465-.104-.961-.104-1.439V5.58l6-3.621V11.97c0 3.806 2.819 6.979 6.45 7.747-.135.165-.24.331-.391.48-.33.322-.675.624-1.064.877-.375.257-.645.465-1.065.644l-.035.003zm10.405-8.408c-.087.404-.211.803-.375 1.186-.439.955-1.148 1.77-1.74 2.294-1.216 1.101-2.725 1.44-2.898 1.44.362-.948.608-1.965.611-3.039V4.725L22.204 2l.003 10.009c0 .431-.018.879-.105 1.296v.008z" } })]); } };