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

adds new boardList and newCardForm files. #2

Merged
merged 1 commit into from
Jun 29, 2022
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
25 changes: 25 additions & 0 deletions src/boardList.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from 'react';
import PropTypes from 'prop-types';
// need to import board

// NEED TO CREATE CSS FILE


const BordList = ({ boards, selectBoard }) => {
const displayBoard = boards.map((board => {
return <ul>{board.title}</ul>
});

return (
<section>
<li>{{displayBoard}}</li>
</section>
)
}


BoardList.propTypes = {
boards: PropTypes.array.isRequired,
}

export default BoardList;
33 changes: 33 additions & 0 deletions src/newCardForm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React, { use state } from 'react';
import PropTypes from 'prop-types';

const newCardForm = ({ createCardFunction }) => {
// State to toogle form
const [isVisible, setVisible] = useState(false);

// State to submit new form
const [newCardMessage, setCardMessage] = useState({cardMessage: ''});

// Event Handler to toggle form:
const toggleCardForm = (event) => {
event.preventDefault();
// finish event handler
}




return (
<section className='new-card-form'>
<h1>Add A New Card</h1>
<form>
<label className='new-card-label'>New Card Message:</label>
<input className='new-card-input' type='text' ></input>w
<button className='new-card-submit-button'>submit</button>
</form>
</section>
)
}


export default NewCard Form;