• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

mamal72/react-github: A set of useful Github components for React

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

mamal72/react-github

开源软件地址:

https://github.com/mamal72/react-github

开源编程语言:

JavaScript 78.5%

开源软件介绍:

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.

profile

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.

repository

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



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
codefellows-seattle-301d21/12-rest-and-github-api发布时间:2022-06-11
下一篇:
TradeStation API Specification发布时间:2022-06-11
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap