2.0.1 • Published 6 months ago

@vlalg-nimbus/github-stars-button v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

github-stars-button

This is a Github Stars Web Component for Frontend Projects.

Installation

CDN
  https://unpkg.com/@vlalg-nimbus/github-stars-button/dist/github-stars-button.min.umd.js
To install
npm install @vlalg-nimbus/github-stars-button

# or

yarn add @vlalg-nimbus/github-stars-button

Usage

<head>
  <script type="module" src="https://unpkg.com/@vlalg-nimbus/github-stars-button/dist/github-stars-button.min.umd.js"></script>
</head>
<body>
  <github-stars-button
    data-repo-owner="repo owner"
    data-repo-name="repo name"
    data-show-count="true"
    data-go-repo="true"
  >
  </github-stars-button>

  <script>
    const githubStarsButton = document.querySelector('github-stars-button')

    githubStarsButton.addEventListener('webcomp-clicked', function(event) {
      const repoOwner = this.dataset.repoOwner
      const repoName = this.dataset.repoName
      const showCount = this.dataset.showCount

      console.log('Here', repoOwner, repoName, showCount)
      console.log('Custom event triggered:', event.detail.message)
    })
  </script>
</body>

Components list

The components that are part of this lib are:

  • github-stars-button

Click on each one above to find out how to use it, properties, events, etc.

License

MIT

2.0.1

6 months ago

2.0.0

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago