[site/components/Nav.js]: Add github star button with count to navbar

This commit is contained in:
virgoaugustine
2022-01-12 12:41:35 +00:00
parent 04d750f5d5
commit 6a14c34f98
3 changed files with 17 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ import { Disclosure, Menu, Transition } from '@headlessui/react'
import { BellIcon, MenuIcon, XIcon } from '@heroicons/react/outline'
import Link from 'next/link'
import GitHubButton from 'react-next-github-btn'
const navigation = [
{ name: 'Docs', href: '/docs' },
@@ -65,6 +66,9 @@ export default function Nav() {
</div>
</div>
</div>
<div className="mt-2 justify-end">
<GitHubButton href="https://github.com/datopian/portal.js" data-color-scheme="no-preference: light; light: light; dark: dark;" data-size="large" data-show-count="true" aria-label="Star datopian/portal.js on GitHub">Stars</GitHubButton>
</div>
</div>
</div>

View File

@@ -22,6 +22,7 @@
"prop-types": "^15.7.2",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-next-github-btn": "^1.2.1",
"react-vega": "^7.4.4",
"remark": "^13.0.0",
"remark-footnotes": "^3.0.0",

View File

@@ -1764,6 +1764,11 @@ get-orientation@1.1.2:
dependencies:
stream-parser "^0.3.1"
github-buttons@^2.8.0:
version "2.21.1"
resolved "https://registry.yarnpkg.com/github-buttons/-/github-buttons-2.21.1.tgz#9e55eb83b70c9149a21c235db2e971c53d4d98a2"
integrity sha512-n9bCQ8sj+5oX1YH5NeyWGbAclRDtHEhMBzqw2ctsWpdEHOwVgfruRu0VIVy01Ah10dd/iFajMHYU71L7IBWBOw==
github-slugger@^1.0.0, github-slugger@^1.2.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-1.3.0.tgz#9bd0a95c5efdfc46005e82a906ef8e2a059124c9"
@@ -3363,6 +3368,13 @@ react-is@^16.8.1:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
react-next-github-btn@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/react-next-github-btn/-/react-next-github-btn-1.2.1.tgz#5e75b344bc7dccaaffa8deab98fa9d5924256998"
integrity sha512-H3re/H0XKTTf/pmPmUtGtyBclkvvP7+8rs9nEPeo410ZgXePrJiOs7966tqffYsZw46u6Yim6oj/259BymNrEQ==
dependencies:
github-buttons "^2.8.0"
react-refresh@0.8.3:
version "0.8.3"
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.8.3.tgz#721d4657672d400c5e3c75d063c4a85fb2d5d68f"