Skip to content
47 changes: 28 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
# react-github-activity
A React based github-activity component.
# react-github-activity-mobile

Inspired by [this repository](https://github.com/caseyscarborough/github-activity) I wanted to develop a github activity component that was much simpler to setup in a react project.
A React based github-activity component for **MOBILE**.

Inspired by [this repository](https://github.com/caseyscarborough/github-activity) and [this repo that extended it further](https://github.com/piotrromanowski/react-github-activity). I wanted to develop a github activity component that was much simpler to setup in a react project, and which was ALSO responsive to different **MOBILE DEVICE** sizes..

It is recommended to pass the client ID and Secret when using the github API to prevent encountering the limit. learn more [here](https://developer.github.com/v3/#oauth2-keysecret)

## Demo
See in action on [my website](http://piotr.codes/)

![](http://i.imgur.com/M9ntwJS.png)
See the project in action on [my website](https://davidplopez.com)

![](https://raw.githubusercontent.com/lopezdp/react-github-activity-mobile/master/gh-activity-mobile.png)

## Installation

`npm install --save react-github-activity`
`npm install --save react-github-activity-mobile`

## Dependencies

Insert an octicons.css file in your html file to load the icons.

```html
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/3.5.0/octicons.min.css">
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/octicons/3.5.0/octicons.min.css"
/>
```

## Features

Enhance your personal website with react-github-activity component that:

- Provides visitors with quick access to your github profile
- Displays your public activity on GitHub


## Usage

```js
Expand All @@ -44,22 +49,24 @@ Enhance your personal website with react-github-activity component that:
## Example

```js
import GitHubFeed from 'react-github-activity'
import GitHubFeed from "react-github-activity-mobile";

class Example extends React.Component {
render() {
const fullName = 'Piotr Romanowski'
const userName = 'piotrromanowski'
const avatarUrl = ''
const events = [/* data result from https://api.github.com/users/${userName}/events */];
const fullName = "David Lopez";
const userName = "lopezdp";
const avatarUrl = "";
const events = [
/* data result from https://api.github.com/users/${userName}/events */
];

return (
<GitHubFeed
fullName={fullName} // Provide Full Name as displayed on GitHub
userName={userName} // Provide User Name as displayed on Guthub
avatarUrl={avatarUrl} // Provide the avatar url of your github profile
events={events} // provide array of events using the users '/events' endpoint of github api
/>
<GitHubFeed
fullName={fullName} // Provide Full Name as displayed on GitHub
userName={userName} // Provide User Name as displayed on Guthub
avatarUrl={avatarUrl} // Provide the avatar url of your github profile
events={events} // provide array of events using the users '/events' endpoint of github api
/>
);
}
}
Expand All @@ -68,3 +75,5 @@ class Example extends React.Component {
## License

MIT

**contact:** [email protected]
Binary file added gh-activity-mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading