2.1.2 • Published 8 years ago

react-github v2.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

Build Status npm version

react-github

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.

Installation

You can install this package via npm:

npm install react-github --save

Components

GithubProfile

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>
    );
  }
}

Properties

  • username: Github username
  • className: custom-additional CSS class for root element of rendered component

GithubRepository

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>
    );
  }
}

Properties

  • 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

Ideas?

Just fill an issue and describe it. I'll check it ASAP. :)

Contribution

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
2.1.2

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago