react-github is a set of react components for Github written by ES6 and ES7. It's a WIP and more components will be added.
You can install this package via npm
:
npm install react-github --save
Renders a simple Github user profile box with some useful info about the user.
import React, { Component } from 'react';
import { GithubProfile } from 'react-github';
class Test extends Component {
render() {
return (
<div>
<GithubProfile username="mamal72" />
</div>
);
}
}
- username: Github username
- className: custom-additional CSS class for root element of rendered component
Renders a repository info box with some details of it.
import React, { Component } from 'react';
import { GithubRepository } from 'react-github';
class Test extends Component {
render() {
return (
<div>
<GithubRepository username="mamal72" repository="react-github" />
<GithubRepository showDescription={false} username="mamal72" repository="react-github" />
<GithubRepository showName={false} username="mamal72" repository="react-github" />
<GithubRepository showUsername={false} username="mamal72" repository="react-github" />
<GithubRepository className="my-profile" username="mamal72" repository="react-github" />
</div>
);
}
}
- username: Github username
- repository: Github repository name
- showName (default: true): render repository name
- showUsername (default: true): render username
- showDescription (default: true): render repository description
- className: custom-additional CSS class for root element of rendered component
Just fill an issue and describe it. I'll check it ASAP. :)
You can fork the repository and send the pull requests.
Remember to lint your code before sending pull requests. Run the following command and fix the errors if you get any.
npm run lint