react-github-renderer
A react custom renderer for Github :octocat:
Table of contents
- Installation
- Motivation
- API
- Renderer
ReactGithub.render(element)
- Components
- Renderer
- Examples
Installation
$ npm install --save react-github-renderer
Alternatively, using yarn.
$ yarn add react-github-renderer
Motivation
Just for fun. I have wanted to look into react implementation (renderer, reconciler).
API
Renderer
ReactGithub.render(element)
Components
- ### Gists
<Gist > <File /></Gist>
<Gist />
description
(String): a description of the gist (Default:''
)isPublic
(Boolean): indicates whether the gist is public. (Default:false
)
<File />
-
name
(String, Required): name of file -
children
(String, Required): contents of file -
### Releases
<Release />
tagName
(String, Required): the name of the tagtargetCommitish
(String): the commitish value that determines where the Git tag is created from (Default:master
)name
(String): the name of the releasedraft
(Boolean):true
to create a draft (unpublished) release,false
to create a published one. (Default:false
)prerelease
(Boolean):true
to identify the release as a prerelease.false
to identify the release as a full release. (Default:false
)children
(String): text describing the contents of the tag
Examples
- ## Gists
import React from 'react';import ReactGithub Gist File from 'react-github-renderer';import GithubClient from './GithubClient'; const gist = ReactGithub; GithubClient;
- ## Releases
import React from 'react';import ReactGithub Release from 'react-github-renderer';import GithubClient from './GithubClient'; const release = ReactGithub; GithubClient;
Thanks
- @nitin42: for helpful tutorial
- @iamdustan: for tiny-react-renderer with a brief implementation
- @CentaurWarchief: for inspiration from react-slack-renderer
License
MIT © Taehwan, No (taehwanno)