-
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.
Merge pull request #4 from SPARCS-Service-Hackathon-2024/feature/chat
Feat: 채팅 구현
- Loading branch information
Showing
9 changed files
with
467 additions
and
68 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from 'react'; | ||
import Modal from 'react-modal'; | ||
import './FourthModal.css'; | ||
|
||
const FirstModal = ({ isOpen, onRequestClose, onSelectNumChild }) => { | ||
return ( | ||
<Modal | ||
isOpen={isOpen} | ||
onRequestClose={onRequestClose} | ||
contentLabel="Fifth Modal" | ||
className="Modal" | ||
overlayClassName="Overlay" | ||
ariaHideApp={false} | ||
> | ||
<div className="modal-content"> | ||
<div className="button-container"> | ||
<button onClick={() => onSelectNumChild('그렇다')} className="modal-button">그렇다</button> | ||
<button onClick={() => onSelectNumChild('아니다')} className="modal-button">아니다</button> | ||
</div> | ||
</div> | ||
</Modal> | ||
); | ||
} | ||
|
||
export default FirstModal; |
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,43 @@ | ||
.Modal { | ||
width: 110px; | ||
height: auto; | ||
position: absolute; | ||
background: #fff; | ||
overflow: auto; | ||
outline: none; | ||
padding: '30px'; | ||
} | ||
|
||
.Overlay { | ||
position: 'fixed'; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
} | ||
|
||
.modal-content { | ||
text-align: center; | ||
} | ||
|
||
.button-container { | ||
align-items: center; | ||
} | ||
|
||
.modal-button { | ||
background-color: #EAE3FC; | ||
width: 173px; | ||
height: 44px; | ||
color: black; | ||
border: none; | ||
padding: 10px 20px; | ||
margin: 10px; | ||
border-radius: 20px; | ||
font-size: 16px; | ||
cursor: pointer; | ||
transition: background-color 0.3s ease; | ||
} | ||
|
||
.modal-button.selected { | ||
background-color: #9A8CFF; | ||
} |
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,25 @@ | ||
import React from 'react'; | ||
import Modal from 'react-modal'; | ||
import './FourthModal.css'; | ||
|
||
const FirstModal = ({ isOpen, onRequestClose, onSelectCar }) => { | ||
return ( | ||
<Modal | ||
isOpen={isOpen} | ||
onRequestClose={onRequestClose} | ||
contentLabel="Fourth Modal" | ||
className="Modal" | ||
overlayClassName="Overlay" | ||
ariaHideApp={false} | ||
> | ||
<div className="modal-content"> | ||
<div className="button-container"> | ||
<button onClick={() => onSelectCar('있다')} className="modal-button">있다</button> | ||
<button onClick={() => onSelectCar('없다')} className="modal-button">없다</button> | ||
</div> | ||
</div> | ||
</Modal> | ||
); | ||
} | ||
|
||
export default FirstModal; |
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,27 @@ | ||
import React from 'react'; | ||
import Modal from 'react-modal'; | ||
import './FirstModal.css'; | ||
|
||
const FirstModal = ({ isOpen, onRequestClose, onSelectNumberOfWeek }) => { | ||
return ( | ||
<Modal | ||
isOpen={isOpen} | ||
onRequestClose={onRequestClose} | ||
contentLabel="Second Modal" | ||
className="Modal" | ||
overlayClassName="Overlay" | ||
ariaHideApp={false} | ||
> | ||
<div className="modal-content"> | ||
<div className="button-container"> | ||
<button onClick={() => onSelectNumberOfWeek('1주')} className="modal-button">1주</button> | ||
<button onClick={() => onSelectNumberOfWeek('2주')} className="modal-button">2주</button> | ||
<button onClick={() => onSelectNumberOfWeek('3주')} className="modal-button">3주</button> | ||
<button onClick={() => onSelectNumberOfWeek('4주')} className="modal-button">4주</button> | ||
</div> | ||
</div> | ||
</Modal> | ||
); | ||
} | ||
|
||
export default FirstModal; |
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,42 @@ | ||
.Modal { | ||
width: 110px; | ||
height: auto; | ||
position: absolute; | ||
background: #fff; | ||
overflow: auto; | ||
outline: none; | ||
padding: '30px'; | ||
} | ||
|
||
.Overlay { | ||
position: 'fixed'; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
} | ||
|
||
.modal-content { | ||
text-align: center; | ||
} | ||
|
||
.button-container { | ||
align-items: center; | ||
} | ||
|
||
.modal-button { | ||
background-color: #EAE3FC; | ||
width: 107px; | ||
color: black; | ||
border: none; | ||
padding: 10px 20px; | ||
margin: 10px; | ||
border-radius: 20px; | ||
font-size: 16px; | ||
cursor: pointer; | ||
transition: background-color 0.3s ease; | ||
} | ||
|
||
.modal-button.selected { | ||
background-color: #9A8CFF; | ||
} |
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 React from 'react'; | ||
import Modal from 'react-modal'; | ||
import './ThirdModal.css'; | ||
|
||
const FirstModal = ({ isOpen, onRequestClose, onSelectStatus }) => { | ||
return ( | ||
<Modal | ||
isOpen={isOpen} | ||
onRequestClose={onRequestClose} | ||
contentLabel="Third Modal" | ||
className="Modal" | ||
overlayClassName="Overlay" | ||
ariaHideApp={false} | ||
> | ||
<div className="modal-content"> | ||
<div className="button-container"> | ||
<button onClick={() => onSelectStatus('학생')} className="modal-button">학생</button> | ||
<button onClick={() => onSelectStatus('직장인')} className="modal-button">직장인</button> | ||
<button onClick={() => onSelectStatus('기타')} className="modal-button">기타</button> | ||
</div> | ||
</div> | ||
</Modal> | ||
); | ||
} | ||
|
||
export default FirstModal; |
Oops, something went wrong.