From 8daf6ba265d91274271f63931a31962a22c2809e Mon Sep 17 00:00:00 2001 From: yena Date: Tue, 9 Apr 2024 15:39:43 +0900 Subject: [PATCH] =?UTF-8?q?:sparkles:=20Feat:=20RetroList=20=ED=9A=8C?= =?UTF-8?q?=EA=B3=A0=20=EC=88=98=EC=A0=95=20=EB=AA=A8=EB=8B=AC=20=EC=B0=BD?= =?UTF-8?q?=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RetroList App.tsx 파일 경로 추가 --- src/App.tsx | 9 ++++++ src/assets/ModalClose.png | Bin 0 -> 1329 bytes src/components/RetroList/ContentsList.tsx | 16 ++++++++-- src/components/RetroList/Modal.tsx | 24 ++++++++++++++ src/styles/RetroList/Modal.styles.ts | 37 ++++++++++++++++++++++ 5 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 src/assets/ModalClose.png create mode 100644 src/components/RetroList/Modal.tsx create mode 100644 src/styles/RetroList/Modal.styles.ts diff --git a/src/App.tsx b/src/App.tsx index bb03f0e..7fd26a0 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -11,6 +11,7 @@ import AuthPage from '@/pages/AuthPage'; import CreateRetroPage from '@/pages/CreateRetroPage'; import HomePage from '@/pages/HomePage'; import MyPage from '@/pages/MyPage'; +import RetroListPage from '@/pages/RetroListPage'; import SurveyPage from '@/pages/SurveyPage'; import WriteRetroPersonalPage from '@/pages/WriteRetroPersonalPage'; import WriteRetroRevisePersonalPage from '@/pages/WriteRetroRevisePersonalPage'; @@ -156,6 +157,14 @@ const App = () => { } > + + + + } + > }> }> diff --git a/src/assets/ModalClose.png b/src/assets/ModalClose.png new file mode 100644 index 0000000000000000000000000000000000000000..c5a7c19583ef9c218054cc87c6449aa5cd09c2b7 GIT binary patch literal 1329 zcmV-11@~0drDELIAGL9O(c600d`2O+f$vv5yPBtjco`6{5A}UNpxJY)obeJa~WrPbzM;E6{>AV3cpy8JD zqaDdMws+55cQ z@9$6N=H|G&&B6Hja>_=k4-XHQ&(F`RD5>B;8v0o(m0tRb{*Tv56sM%|$7+12c6@w% zN(Dtp_7Qon#3h95G;%FZAWhMKHB>oV7fB`!)YGg z-=k?2iY)KsdO9gESV%6jiq&@*Xc?F*2IAj@?vRS5@I3^SQQ6+$_ph8q<$eSg*(;ZPHm77 zo-`Vpo114z^+HMm&cp$JSlH!ajpWq%9mdtPlcA*nr{aL7yc-r%=Ns()_=&^A!_{)R zd`?1aN(0Wt0bBC;4P1?1CSCIJ1xZ6({|mPxe&Ra|FXDiyJY8wb84vpgS;m_(m)V#z>z#J(t!7& zs=#(w?D`=~!IdM&v=--Q8Wi)oOX$n;cvmFp(ER8VEL2$5@E} z#PAw#VSavI>sk}CFjSMa%%)*vf36RLinAn5;ZJUr@O#~EPig8iY&-;BF?2W zMQC|WCI^<*CWq1h>KRNJ;`g%SSQn?0>LZn=i0gmkKWX$VnkMa89jZR14RdsKRO2Cw zuLkL|Lpxp6nz&HX6u#wI5vQ4nH+6rAE?qie9fbaG7f>7MBNU3YUq>B5}I81k4AP zc1;0rB`>u&!<^4=6c88kQi*esDC-;B@)E@rL7Kv*yqV&PBu!!K#~G%IE21=ojUQ*2 zc*|8}X~XcHLW_%33*KSi=2gV8v<*J-nS>-I|7Q`CT-y = ({ status, viewMode, searchData }) => { + const [openModalId, setOpenModalId] = useState(null); + + const openModalForItem = (itemId: number) => { + setOpenModalId(itemId); + }; + + const closeModalForItem = () => { + setOpenModalId(null); + }; + const data: Content[] = [ { id: 1, title: '회고1', status: 'Teams', userId: null, teamId: 1 }, { id: 2, title: '회고2', status: 'Teams', userId: null, teamId: 2 }, @@ -53,7 +64,8 @@ const ContentList: React.FC = ({ status, viewMode, searchData
{item.title} - + openModalForItem(item.id)} /> + ))} diff --git a/src/components/RetroList/Modal.tsx b/src/components/RetroList/Modal.tsx new file mode 100644 index 0000000..d6f5878 --- /dev/null +++ b/src/components/RetroList/Modal.tsx @@ -0,0 +1,24 @@ +import ModalClose from '@/assets/modalClose.png'; +import * as S from '@/styles/RetroList/Modal.styles'; + +interface ModalProps { + onClose: () => void; + isOpen: boolean; +} + +const Modal: React.FC = ({ onClose, isOpen }) => { + return ( + + +
+ + + + 생성자가 아닌 참여자는 수정 권한이 없습니다. +
+
+
+ ); +}; + +export default Modal; diff --git a/src/styles/RetroList/Modal.styles.ts b/src/styles/RetroList/Modal.styles.ts new file mode 100644 index 0000000..3388ebd --- /dev/null +++ b/src/styles/RetroList/Modal.styles.ts @@ -0,0 +1,37 @@ +import styled from 'styled-components'; + +export const ModalOverlay = styled.div<{ isOpen: boolean }>` + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + display: ${props => (props.isOpen ? 'flex' : 'none')}; + justify-content: center; + align-items: center; +`; + +export const ModalContent = styled.div` + background-color: white; + padding: 20px; + border-radius: 8px; +`; +export const CloseBox = styled.div` + display: flex; + justify-content: flex-end; + border-bottom: 1px solid #b5b5b5; + margin-bottom: 10px; + padding-bottom: 10px; + margin-top: 0; +`; + +export const CloseImg = styled.img` + width: 10px; + height: 10px; + cursor: pointer; +`; + +export const Text = styled.span` + color: #111b47; +`;