Skip to content

Commit

Permalink
adding footer and header component
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillermo Eyherabide committed Jul 13, 2016
1 parent f4d4935 commit 7cad477
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
7 changes: 6 additions & 1 deletion day-2-not-resolved/src/components/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ import * as React from "react";
import { Animation } from './animation';
import { ListToPlay } from './playable/playables';
import { FullList } from './animations/fullList';
import { Header } from './header';
import { Footer } from './footer';

export interface ApplicationProps { }

export class Application extends React.Component<ApplicationProps, {}> {
render() {
return <div>
<Header text="My first React Application"/>
<section className="list-to-play">
<h1>Playable List</h1>
<ListToPlay/>
Expand All @@ -19,7 +22,9 @@ export class Application extends React.Component<ApplicationProps, {}> {
<section className="full-list">
<h1>Choosing List</h1>
<FullList/>
</section>
</section>
<Footer text="Learning ReactJS" link="https://github.com/reactjs"/>
</div>;

}
}
12 changes: 12 additions & 0 deletions day-2-not-resolved/src/components/footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import * as React from "react";

export interface ILink { text: string,
link: string }

export class Footer extends React.Component<ILink, void> {
render() {
return <footer>
<a href={this.props.link}>{this.props.text}</a>
</footer>
}
}
9 changes: 9 additions & 0 deletions day-2-not-resolved/src/components/header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import * as React from "react";

export interface IText { text: string }

export class Header extends React.Component<IText, void> {
render() {
return <h1>{this.props.text}</h1>
}
}

0 comments on commit 7cad477

Please sign in to comment.