1.1.1 • Published 7 years ago

react-github-cards v1.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

react-github-cards

show github profile card and repo card by the way of react compoent, inpired by mamal72/react-github and lepture, you can choose theme of the card, welcome to fork to custom your own theme or make a pull request.

Demo

Install

  npm install react-github-cards -S  

Usage

import { UserCard, RepoCard } from 'react-github-cards';
import 'react-github-cards/dist/default.css';

// use medium theme
// import { UserCard, RepoCard } from 'react-github-cards/dist/medium'
import 'react-github-cards/dist/medium.css';


render() {
  <div>
    <UserCard username="foo" />
    <RepoCard username="foo" repo="bar" />
  </div>
}

Themes

currently, just have two kinds of themes, default and medium.

Authenticated request

to avoid Github Api Rate Limits simply provide an OAuth Client/Secret:

import { UserCard, RepoCard } from 'react-github-cards';

render() {
  <div>
    <UserCard username="foo" clientId="foo" clientSecret="bar" />
    <RepoCard username="foo" repo="bar"  clientId="foo" clientSecret="bar"/>
  </div>
}

Components

  • <UserCard />
propsrequiredvalue
usernameyesstring
clientIdnostring
clientSecretnostring
  • <RepoCard />
propsrequiredvalue
usernameyesstring
repoyesstring
clientIdnostring
clientSecretnostring

Licence

MIT

1.1.1

7 years ago

1.1.0

7 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago