Skip to content

Commit 3fbb7cd

Browse files
piotrromanowskipiotrromanowski
piotrromanowski
authored and
piotrromanowski
committed
made profile Url optional, Updated styles.
1 parent 60ed61a commit 3fbb7cd

File tree

5 files changed

+29
-6
lines changed

5 files changed

+29
-6
lines changed

CONTRIBUTING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Prerequisites
2+
3+
[Node.js](http://nodejs.org/) must be installed.
4+
5+
## Installation
6+
7+
* Running `npm install` in the components's root directory will install everything you need for development.
8+
9+
## Demo Development Server
10+
11+
* `npm start` will run a development server with the component's demo app at [http://localhost:3000](http://localhost:3000) with hot module reloading.
12+
13+
## Running Tests
14+
15+
* `npm test` will run the tests once.
16+
* `npm run test:watch` will run the tests on every change.
17+
18+
## Building
19+
20+
* `npm run build` will build the component for publishing to npm and also bundle the demo app.
21+
22+
* `npm run clean` will delete built resources.

demo/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ let Demo = React.createClass({
5151

5252
return (<div>
5353
<h1>react-github-activity Demo</h1>
54-
<Component events={eventList} fullName='Piotr Romanowski' userName='piotrromanowski' avatarUrl='https://avatars0.githubusercontent.com/u/5794815?v=3&s=460' profileUrl='https://github.com/piotrromanowski'/>
54+
<Component events={eventList} fullName='Piotr Romanowski' userName='piotrromanowski' avatarUrl='https://avatars0.githubusercontent.com/u/5794815?v=3&s=460'/>
5555
</div>);
5656
}
5757
})

src/head/profileDetails.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import React from 'react';
22

33
export default (props) => {
4+
const profileUrl = props.profileUrl ? props.profileUrl : `https://github.com/${props.userName}`
45
return (
5-
<a href={ props.profileUrl } style={ props.styles.githubProfile }>
6+
<a href={ profileUrl } style={ props.styles.githubProfile }>
67
<div style={ props.styles.githubFullname }>
78
{ props.fullName }
89
</div>
910
<div style={ props.styles.githubUsername }>
1011
{ props.userName }
1112
</div>
1213
</a>
13-
);
14+
);
1415
}

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default class GithubFeed extends Component {
99
fullName: PropTypes.string.isRequired,
1010
userName: PropTypes.string.isRequired,
1111
avatarUrl: PropTypes.string.isRequired,
12-
profileUrl: PropTypes.string.isRequired,
12+
profileUrl: PropTypes.string,
1313
events: PropTypes.array.isRequired
1414
}
1515

src/styles.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ export const styles = {
77
'minHeight': '200px',
88
'width': 'inherit',
99
'minWidth': '500px',
10-
'font-family': '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif',
11-
'font-size': '1rem',
10+
'fontFamily': '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif',
11+
'fontSize': '1rem',
1212
'color': '#373a3c'
1313
},
1414
githubHeaderOuter: {

0 commit comments

Comments
 (0)