Request: Programming language icons
Closed this issue · 2 comments
praneetloke commented
I use ionicons5 for a project I am working on and I have found your icon library really useful! Thank you for your work on this. As the title states, this is to request adding icons for Google's Go programming language and Microsoft DotNet framework.
07akioni commented
Sorry for the library mainly focused on existing complete icon sets, it won't add discrete icon.
praneetloke commented
Thanks for the response. I managed to use the SVG icons along with NaiveUI's (thanks for another awesome project, @07akioni) n-icon
component. So I don't need these anymore. In case it's useful for someone else, here's what I did. (There might be a better way to do this)
<template>
<LogoDotNet />
<LogoGo />
</template>
<script lang="ts">
import { defineComponent } from "vue";
// In order to import SVG as files, I added vite-svg-loader to my vite config.
import LogoDotNet from "/assets/dotnet.svg";
import LogoGo from "/assets/go.svg";
function wrappedRenderHtmlElement(
parent: Component,
htmlTag: string,
attrs: any = null,
childAttrs: any = null
): () => VNodeChild {
return () => h(parent, attrs, { default: () => h(htmlTag, childAttrs) });
}
export default defineComponent({
components: {
LogoDotNet: wrappedRenderHtmlElement(NIcon, LogoDotNet, { size: 22 }),
LogoGo: wrappedRenderHtmlElement(NIcon, LogoGo, { size: 30 }),
},
});
</script>