https://github.com/sinchang/react-github-badge
GitHub badge made for react
https://github.com/sinchang/react-github-badge
badge github react
Last synced: about 1 year ago
JSON representation
GitHub badge made for react
- Host: GitHub
- URL: https://github.com/sinchang/react-github-badge
- Owner: sinchang
- License: mit
- Created: 2017-12-31T15:33:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-18T07:33:38.000Z (over 7 years ago)
- Last Synced: 2025-05-12T22:18:30.012Z (about 1 year ago)
- Topics: badge, github, react
- Language: JavaScript
- Homepage: https://react-github-badge.netlify.com/
- Size: 77.1 KB
- Stars: 0
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-github-badge
> Inspired by [vue-github-badge](https://github.com/egoist/vue-github-badge)
[](https://npmjs.com/package/@sinchang/react-github-badge)
[](https://npmjs.com/package/@sinchang/react-github-badge)
## Demo
[see here](https://react-github-badge.netlify.com)
## Install
```bash
yarn add @sinchang/react-github-badge
```
## Usage
```react
import GithubBadge from '@sinchang/react-github-badge'
...
render () {
return (
)
}
```
## API
### Props
#### slug
Type: `string`
Required: `true`
GitHub slug (owner/repo)
#### width/height
Type: `number`
Default: `36`
width/height of svg icon
#### fill
Type: `string`
Default: `black`
The `fill` color of svg icon, you can set it to `currentColor` to inherit from parent element.
## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D
## Author
**react-github-badge** © [sinchang](https://github.com/sinchang), Released under the [MIT](./LICENSE) License.
Authored and maintained by sinchang with help from contributors ([list](https://github.com/sinchang/react-github-badge/contributors)).
> [sinchang.me](https://sinchang.me) · GitHub [@sinchang](https://github.com/sinchang) · Twitter [@sinchangwen](https://twitter.com/sinchangwen)