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

Added basic BoardList, Board components and App skeleton #1

Merged
merged 1 commit into from
Jun 29, 2021
Merged
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
34 changes: 33 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,42 @@
import React, { useState } from 'react';
import './App.css';
import BoardList from './components/BoardList';

function App() {
const testData = [
{
id: 1,
title: 'Break Week Fun'
},
{
id: 2,
title: 'Ada Is Awesome'
},
{
id: 3,
title: 'Shout Outs '
},
]

const [boardsData, setBoardsData] = useState(testData)

return (
<div>
<h1> Inspiration Board </h1>
<main>

<section className='new-board-form__container'>
<h2>Create a New Board</h2>
{/* < NewBoardForm /> */}
</section>
<section className='boards__container'>
<h2>Choose A Board</h2>
< BoardList
boardsData= { boardsData }
/>
</section>
{/* <section>
< CardList />
</section> */}
</main>
</div>

Expand Down
12 changes: 12 additions & 0 deletions src/components/Board.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from "react";
import { useState } from "react";

const Board = (props) => {
return (
<button>
{props.id}: {props.title}
</button>
);
};

export default Board;
18 changes: 18 additions & 0 deletions src/components/BoardList.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';
import Board from './Board';

const BoardList = (props) => {

const boardList = props.boardsData.map((board) => {
return (
<Board
title= {board.title}
id= {board.id}
/>
)
})

return <section>{ boardList }</section>
}

export default BoardList;
9 changes: 5 additions & 4 deletions src/components/Card.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';

const Card = () => {
return (

)
}
return []
}
export default Card;
7 changes: 7 additions & 0 deletions src/components/NewBoardForm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

const NewBoardForm = () => {
return []
}

export default NewBoardForm;
7 changes: 7 additions & 0 deletions src/components/NewCardForm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

const NewCardForm = () => {
return []
}

export default NewCardForm;