-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f426f3d
commit 3cb31ad
Showing
12 changed files
with
135 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
import '../styles/Button.css'; | ||
import add from '../assets/add.png'; | ||
import PropTypes from 'prop-types'; | ||
|
||
const Button = () => { | ||
const Button = ({type, onClick}) => { | ||
return ( | ||
<button className='btn'> | ||
<button className='btn' onClick={onClick}> | ||
<img src={add} alt='icon' /> | ||
<p>Add note</p> | ||
<p>{type} note</p> | ||
</button> | ||
) | ||
} | ||
|
||
Button.propTypes = { | ||
type: PropTypes.string.isRequired, | ||
onClick: PropTypes.func.isRequired | ||
} | ||
|
||
export default Button; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import '../styles/TextArea.css' | ||
|
||
const TextArea = () => { | ||
return ( | ||
<div className='textarea-container'> | ||
<label>Take a note...</label> | ||
<textarea rows='20' name='content'/> | ||
</div> | ||
) | ||
} | ||
|
||
export default TextArea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import Button from '../components/Button' | ||
import Input from '../components/Input'; | ||
import TextArea from '../components/TextArea'; | ||
import '../styles/NoteForm.css'; | ||
|
||
const NoteForm = () => { | ||
|
||
const onClick = (e) => { | ||
e.preventDefault(); | ||
console.log('Add note button clicked'); | ||
} | ||
|
||
return ( | ||
<div className="note-form-container"> | ||
<form className="note-form"> | ||
<Input type="text" placeholder="Title" name='title'/> | ||
<TextArea /> | ||
<div className='note-form-footer'> | ||
<Button type='Add' onClick={onClick}/> | ||
</div> | ||
</form> | ||
</div> | ||
) | ||
} | ||
|
||
export default NoteForm |
2 changes: 1 addition & 1 deletion
2
frontend/src/components/NoteList.jsx → frontend/src/pages/NoteList.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,22 @@ | ||
.form-container { | ||
width: 100%; | ||
} | ||
|
||
.form-footer { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
align-content: center; | ||
margin: 10px; | ||
} | ||
|
||
.form-footer button { | ||
padding: 10px 20px; | ||
border-radius: 10px; | ||
border: none; | ||
outline: none; | ||
color: #0d1b2a; | ||
cursor: pointer; | ||
background-color: #ffbe0b; | ||
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.note-form-container { | ||
width: 100%; | ||
} | ||
|
||
.note-form-footer { | ||
display: flex; | ||
justify-content: start; | ||
align-items: center; | ||
align-content: center; | ||
margin: 10px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.textarea-container { | ||
width: 100%; | ||
padding: 5px; | ||
margin: 15px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: start; | ||
align-items: start; | ||
align-content: center; | ||
border-radius: 4px; | ||
} | ||
|
||
.textarea-container textarea { | ||
width: 80%; | ||
padding: 10px; | ||
border: 1px solid #e0e1dd; | ||
border-radius: 4px; | ||
outline: none; | ||
background-color: #f8f9fa; | ||
} | ||
|
||
.textarea-container textarea:focus { | ||
border: 1px solid #0d1b2a; | ||
} | ||
|
||
.textarea-container label { | ||
margin-bottom: 5px; | ||
color: #0d1b2a; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,24 @@ | ||
@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&display=swap'); | ||
|
||
body { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
background-color: #e0e1dd; | ||
font-family: 'Kalam', cursive; | ||
font-size: 18px; | ||
} | ||
|
||
input[type="search"] { | ||
font-size: 16px; | ||
} | ||
|
||
input, button { | ||
font-family: 'Kalam', cursive; | ||
font-size: 18px; | ||
} | ||
|
||
textarea { | ||
font-family: 'Kalam', cursive; | ||
font-size: 18px; | ||
} |