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

Answer #2

Open
wants to merge 2 commits into
base: main
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
2 changes: 2 additions & 0 deletions .replit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
language = "nodejs"
run = "npm start"
82 changes: 60 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
import React, { Component } from 'react';
import './App.css';
// imports all the components -
import Header from './Header';
import SectionMain from './SectionMain';
import Aside from './Aside';
import Footer from './Footer';


//class based component for App - holds all of our app's components
class App extends Component {

render() {
return (
<div className="App">
<Header backColor="green" width="50%"></Header>
<Header backColor="green" width="50%" borderProp="1px solid red"></Header>
// header component to render the header
// backColor and width are props
<SectionMain></SectionMain>
// plugs in SectionMain component
<Aside></Aside>
// plugs in the Aside component
<Footer></Footer>
// footer component to render the footer
</div>
);
}
}

export default App;
export default App; // Allows App class to be used outside of this file
4 changes: 4 additions & 0 deletions src/Aside.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import React, { Component } from 'react';
import './Aside.css';


//class based Component for Aside - holds all of our Aside's components
class Aside extends Component {
render() {
return (
<aside className="Aside">
</aside>

);
// tells what to return when you plug Aside into App.js
}
}

export default Aside;
// allow access of Aside outside this file
6 changes: 4 additions & 2 deletions src/Footer.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import React, { Component } from 'react';
import './Footer.css';

// class-based component that controls how the Footer behaves
class Footer extends Component {
render() {
return (
<footer className="Footer">
</footer>

</footer>0
);
// tells what to return when you plug Footer into App.js
}
}

export default Footer;
// allow access of Footer outside this file
Loading