v-simple-icons
Version:
Simply beautiful open source icons as Vue functional components.
32 lines • 1.95 kB
JavaScript
import _mergeJSXProps from "babel-helper-vue-jsx-merge-props";
export default {
name: 'CodecademyIcon',
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", ["Codecademy icon"]), h("path", {
attrs: {
d: "M23.827 19.73h-5.595c-.094 0-.17.058-.17.172v1.515c0 .094.058.17.172.17h5.594c.096 0 .172-.044.172-.164v-1.515c0-.105-.057-.166-.173-.166v-.014.002zM16.463 2.465c.016.035.03.068.047.12v18.79c0 .061-.02.096-.037.114a.168.168 0 0 1-.135.06H.153c-.038 0-.075 0-.097-.02A.181.181 0 0 1 0 21.395V2.566c0-.076.04-.134.096-.15h16.242c.04 0 .096.017.115.034v.016l.01-.001zM1.818 19.575c0 .073.038.136.096.153h12.643c.058-.019.096-.076.096-.154V4.404c0-.073-.039-.134-.098-.15H1.915c-.056.02-.096.073-.096.15l-.003 15.17.002.001zm5.174-8.374c.65 0 1.014.177 1.396.619.058.075.153.094.23.035l1.034-.92c.075-.044.058-.164.02-.224-.635-.764-1.554-1.244-2.74-1.244-1.59 0-2.79.795-3.255 2.206-.165.495-.24 1.126-.24 1.979 0 .855.075 1.484.255 1.98.465 1.426 1.665 2.205 3.255 2.205 1.2 0 2.115-.48 2.745-1.216.045-.074.06-.165-.015-.226L8.64 15.48c-.073-.047-.163-.047-.224.027-.39.45-.795.69-1.454.69-.706 0-1.245-.345-1.47-1.035-.136-.39-.166-.87-.166-1.483 0-.615.045-1.068.18-1.471.24-.659.766-1.007 1.486-1.007z"
}
})]);
}
};