Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding footer and header component #3

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions application.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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/>
</section>
<section className="animation">
<h1>Animation</h1>
<Animation />
</section>
<section className="full-list">
<h1>Choosing List</h1>
<FullList/>
</section>
<Footer text="Learning ReactJS" link="https://github.com/reactjs"/>
</div>;

}
}
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>
}
}
12 changes: 12 additions & 0 deletions 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 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>
}
}
30 changes: 30 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "proj",
"version": "1.0.0",
"description": "ejemplo",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "webpack",
"start:dev": "webpack-dev-server"
},
"author": "Jotaoncode",
"license": "ISC",
"dependencies": {
"classnames": "^2.2.5",
"events": "^1.1.1",
"flux": "^2.1.1",
"material-ui": "^0.15.1",
"react": "^15.2.0",
"react-addons-update": "^15.2.1",
"react-dom": "^15.2.0",
"ts-eventemitter": "^0.1.0"
},
"devDependencies": {
"retyped-classnames-tsd-ambient": "0.0.0-0",
"source-map-loader": "^0.1.5",
"ts-loader": "^0.8.2",
"webpack": "^1.13.1",
"webpack-dev-server": "^1.14.1"
}
}