Skip to content

Commit

Permalink
Add GithubIcon ( #83 )
Browse files Browse the repository at this point in the history
  • Loading branch information
Bunlong authored Aug 12, 2023
2 parents 031f582 + 90ff75f commit 29bb419
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 3 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 0.25.0 (2023-08-07)

### ✨ Features

* Add GithubIcon

Credits

* [@Bunlong](https://github.com/Bunlong)

## 0.24.0 (2023-07-20)

### ✨ Features
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,7 @@ import {
EmailIcon,
FacebookIcon,
FacebookMessengerIcon,
GithubIcon,
HatenaIcon,
InstagramIcon,
InstapaperIcon,
Expand Down Expand Up @@ -937,9 +938,9 @@ import {

## 📜 Changelog

Latest version 0.24.0 (2023-07-20):
Latest version 0.25.0 (2023-08-07):

* Add documentary icon
* Add GithubIcon

Details changes for each release are documented in the [CHANGELOG.md](https://github.com/Bunlong/next-share/blob/master/CHANGELOG.md).

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next-share",
"version": "0.24.0",
"version": "0.25.0",
"description": "Social media share buttons for your next React apps.",
"author": "Bunlong <[email protected]>",
"license": "MIT",
Expand Down
9 changes: 9 additions & 0 deletions src/icons/GithubIcon.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import createIcon from '../hocs/createIcon';

const GithubIcon = createIcon({
color: '#24292e',
name: 'github',
path: 'M32,16c-8.8,0-16,7.2-16,16c0,7.1,4.6,13.1,10.9,15.2 c0.8,0.1,1.1-0.3,1.1-0.8c0-0.4,0-1.4,0-2.7c-4.5,1-5.4-2.1-5.4-2.1c-0.7-1.8-1.8-2.3-1.8-2.3c-1.5-1,0.1-1,0.1-1 c1.6,0.1,2.5,1.6,2.5,1.6c1.4,2.4,3.7,1.7,4.7,1.3c0.1-1,0.6-1.7,1-2.1c-3.6-0.4-7.3-1.8-7.3-7.9c0-1.7,0.6-3.2,1.6-4.3 c-0.2-0.4-0.7-2,0.2-4.2c0,0,1.3-0.4,4.4,1.6c1.3-0.4,2.6-0.5,4-0.5c1.4,0,2.7,0.2,4,0.5c3.1-2.1,4.4-1.6,4.4-1.6 c0.9,2.2,0.3,3.8,0.2,4.2c1,1.1,1.6,2.5,1.6,4.3c0,6.1-3.7,7.5-7.3,7.9c0.6,0.5,1.1,1.5,1.1,3c0,2.1,0,3.9,0,4.4 c0,0.4,0.3,0.9,1.1,0.8C43.4,45.1,48,39.1,48,32C48,23.2,40.8,16,32,16z',
});

export default GithubIcon;
1 change: 1 addition & 0 deletions src/next-share.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export { default as EmailIcon } from './icons/EmailIcon';
export { default as GabIcon } from './icons/GabIcon';
export { default as InstagramIcon } from './icons/InstagramIcon';
export { default as SpotifyIcon } from './icons/SpotifyIcon';
export { default as GithubIcon } from './icons/GithubIcon';

// Buttons
export { default as FacebookShareButton } from './components/buttons/FacebookShareButton';
Expand Down
4 changes: 4 additions & 0 deletions supports/create-next-app/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import {
// RedditShareCount,
InstagramIcon,
SpotifyIcon,
GithubIcon,
} from 'next-share'

const Home: NextPage = () => {
Expand Down Expand Up @@ -260,6 +261,9 @@ const Home: NextPage = () => {
<span style={{marginRight: 10, width: 32, height: 32}}>
<SpotifyIcon size={32} round />
</span>
<span style={{marginRight: 10, width: 32, height: 32}}>
<GithubIcon size={32} round />
</span>
{/* <OKShareCount url={'https://github.com/next-share'} /> */}
<OKShareCount url={'https://github.com/next-share'}>
{shareCount => <span className="myShareCountWrapper">OKShareCount: {shareCount}</span>}
Expand Down

0 comments on commit 29bb419

Please sign in to comment.