-
Notifications
You must be signed in to change notification settings - Fork 1
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 #18 from Skhuthon/feature/17
모달창 구현
- Loading branch information
Showing
9 changed files
with
204 additions
and
23 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,24 @@ | ||
import React, { useState } from "react"; | ||
import Modal from "react-modal"; | ||
|
||
const ErrorModal = () => { | ||
// 모달의 상태를 관리하기 위해 useState 훅 사용 | ||
const [modalIsOpen, setModalIsOpen] = useState(false); | ||
|
||
// 모달을 열기 위한 함수 | ||
const openModal = () => { | ||
setModalIsOpen(true); | ||
}; | ||
|
||
// 모달을 닫기 위한 함수 | ||
const closeModal = () => { | ||
setModalIsOpen(false); | ||
}; | ||
|
||
return ( | ||
<Modal isOpen={modalIsOpen} onRequestClose={closeModal}> | ||
<div className="error">3개 이상은 안됩니다.</div> | ||
</Modal> | ||
); | ||
}; | ||
export default ErrorModal; |
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
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,60 @@ | ||
import styled from "styled-components"; | ||
import ReactModal from "react-modal"; | ||
|
||
export const StyledModal = styled(ReactModal)` | ||
width: 25rem; | ||
height: 15rem; | ||
position: fixed; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
background: radial-gradient(50% 50% at 50% 50%, #3b3b3b 0%, #080101 100%); | ||
filter: drop-shadow(0px 0px 10px #03ff8e73); | ||
border-radius: 1rem; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
.error { | ||
font-size: 1.2rem; | ||
/* font-weight: bold; */ | ||
color: #03ff8d; | ||
/* #080101 */ | ||
} | ||
.warningIcon { | ||
width: 3rem; | ||
} | ||
.okBtn { | ||
margin-top: 2rem; | ||
padding: 0.4rem 1.2rem; | ||
border-radius: 1rem; | ||
font-size: 0.9rem; | ||
color: #080101; | ||
background-color: #03ff8d; | ||
border: 1px solid #03ff8d; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
.okBtn:hover { | ||
color: #03ff8d; | ||
background-color: #080101; | ||
cursor: pointer; | ||
} | ||
`; | ||
|
||
export const customStyles = { | ||
overlay: { | ||
background: "rgba(0, 0, 0, 0.5)", | ||
backdropFilter: "blur(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