
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
github.com/vinayakkulkarni/v-github-icon
⚠️ Docs are for Vue 3, for Vue 2 docs, check this tree
npm i v-github-icon
npm i v-github-icon@1 && npm i -D @vue/composition-api
^3.x
npm install --save v-github-icon
# install dependencies
$ npm install
# package the library
$ npm run build
Register the component globally:
// main.ts
import { VGithubIcon } from 'v-github-icon';
import { createApp } from 'vue';
const app = createApp({});
app.component('VGithubIcon', VGithubIcon);
Or use locally
import { VGithubIcon } from 'v-github-icon';
For Nuxt 3, create a file in plugins/v-github-icon.ts
import { VGithubIcon } from 'v-github-icon';
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.component('VGithubIcon', VGithubIcon);
then import the file in nuxt.config.{j|t}s
:
export default {
// ...
plugins: [
// ...
{ src: '~/plugins/v-github-icon', mode: 'client' },
// ...
],
// ...
};
<v-github-icon
:position="position"
:url="url"
:bg-color="bgColor"
:fill-color="fillColor"
/>
<script lang="ts">
import { defineComponent, ref } from 'vue';
import { VGithubIcon } from 'v-github-icon';
export default defineComponent({
components: {
VGithubIcon,
},
setup() {
const state = ref({
position: 'top-left',
url: 'https://github.com/vinayakkulkarni/v-github-icon',
bgColor: '#FFF',
fillColor: '#111',
});
return {
state,
};
},
});
</script>
<v-github-icon url="https://github.com/vinayakkulkarni/v-github-icon" />
<script lang="ts">
import { defineComponent } from 'vue';
import { VGithubIcon } from 'v-github-icon';
export default defineComponent({
name: 'App',
components: {
VGithubIcon,
},
});
</script>
Name | Type | Required? | Description |
---|---|---|---|
url | String | Yes | The URL link to GitHub project repository |
position | String | No | Position of the icon, 'top-left' or 'top-right' |
bg-color | String | No | Color of the octocat |
fill-color | String | No | Color excluding the octocat |
git checkout -b feat/new-feature
)git commit -Sam 'feat: add feature'
)git push origin feat/new-feature
)Note:
v-github-icon © Vinayak, Released under the MIT License.
Authored and maintained by Vinayak Kulkarni with help from contributors (list).
vinayakkulkarni.dev · GitHub @vinayakkulkarni · Twitter @_vinayak_k
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.