Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Programming language icons #126

Closed
praneetloke opened this issue Aug 14, 2021 · 2 comments
Closed

Request: Programming language icons #126

praneetloke opened this issue Aug 14, 2021 · 2 comments

Comments

@praneetloke
Copy link

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
Copy link
Owner

Sorry for the library mainly focused on existing complete icon sets, it won't add discrete icon.

@praneetloke
Copy link
Author

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants