1.1.1 • Published 9 years ago

react-github-cards v1.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
9 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

9 years ago

1.1.0

9 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago