diff --git a/public/index.html b/public/index.html index aa069f2..f5492d6 100644 --- a/public/index.html +++ b/public/index.html @@ -7,7 +7,7 @@ + - React App + News Monkey -- Get your daily dose of news for free @@ -39,5 +40,6 @@ To begin the development, run `npm start` or `yarn start`. To create a production bundle, use `npm run build` or `yarn build`. --> + diff --git a/src/App.js b/src/App.js index a6e36ea..eee6e87 100644 --- a/src/App.js +++ b/src/App.js @@ -1,12 +1,15 @@ import './App.css'; import React, { Component } from 'react' +import NavBar from './components/NavBar'; +import News from './components/News'; export default class App extends Component { render() { return (
- Hello my first class based component + +
) } diff --git a/src/components/NavBar.js b/src/components/NavBar.js new file mode 100644 index 0000000..24a947a --- /dev/null +++ b/src/components/NavBar.js @@ -0,0 +1,33 @@ +import PropTypes from 'prop-types' +import React, { Component } from 'react' + +export class NavBar extends Component { + static propTypes = {} + + render() { + return ( +
+ +
+ ) + } +} + +export default NavBar \ No newline at end of file diff --git a/src/components/News.js b/src/components/News.js new file mode 100644 index 0000000..afaffc4 --- /dev/null +++ b/src/components/News.js @@ -0,0 +1,18 @@ +import React, { Component } from 'react' +import NewsItem from './NewsItem' + +export class News extends Component { + render() { + return ( +
This is a news component + + + + + +
+ ) + } +} + +export default News \ No newline at end of file diff --git a/src/components/NewsItem.js b/src/components/NewsItem.js new file mode 100644 index 0000000..96b51f6 --- /dev/null +++ b/src/components/NewsItem.js @@ -0,0 +1,13 @@ +import React, { Component } from 'react' + +export class NewsItem extends Component { + render() { + return ( +
+ This is a news item +
+ ) + } +} + +export default NewsItem \ No newline at end of file diff --git a/src/index.css b/src/index.css index ec2585e..e69de29 100644 --- a/src/index.css +++ b/src/index.css @@ -1,13 +0,0 @@ -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; -}