-
Notifications
You must be signed in to change notification settings - Fork 165
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
6100006
commit 4fdb79a
Showing
13 changed files
with
146 additions
and
70 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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{ | ||
"printWidth": 100, | ||
"singleQuote": true, | ||
"semi": true, | ||
"trailingComma": "es5", | ||
|
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 was deleted.
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
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
22 changes: 15 additions & 7 deletions
22
src/components/Pages/CardRegisterPage/CardRegisterPage.tsx
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,26 @@ | ||
import { ReactNode } from 'react'; | ||
import { createPortal } from 'react-dom'; | ||
|
||
import * as styled from './PortalBottomSheet.styled'; | ||
|
||
const PortalBottomSheet = ({ | ||
handleCloseModal, | ||
children, | ||
}: { | ||
handleCloseModal: () => void; | ||
children: ReactNode; | ||
}) => { | ||
return ( | ||
<> | ||
{createPortal( | ||
<styled.PortalBottomSheet> | ||
<styled.Backdrop onClick={handleCloseModal} /> | ||
<styled.Contents>{children}</styled.Contents>; | ||
</styled.PortalBottomSheet>, | ||
document.body | ||
)} | ||
</> | ||
); | ||
}; | ||
|
||
export default PortalBottomSheet; |
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,15 @@ | ||
import { useState } from 'react'; | ||
|
||
export const useModal = (modalInitState = true) => { | ||
const [isOpenModal, setIsOpenModal] = useState(modalInitState); | ||
|
||
const handleCloseModal = () => { | ||
setIsOpenModal(false); | ||
}; | ||
|
||
const handleOpenModal = () => { | ||
setIsOpenModal(true); | ||
}; | ||
|
||
return { isOpenModal, handleCloseModal, handleOpenModal }; | ||
}; |