From dcaa48006b4f0d2fcf8d5fe50d6610e600f9bf31 Mon Sep 17 00:00:00 2001 From: ddubbu Date: Sat, 11 Nov 2023 21:05:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Layout=20-=20Footer=20=ED=99=95?= =?UTF-8?q?=EC=9E=A5,=20=EC=9E=90=EB=85=80=EC=A0=95=EB=B3=B4=ED=99=95?= =?UTF-8?q?=EC=9D=B8=20=EB=B0=98=EC=9D=91=ED=98=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Front-end/src/components/Button/LongBtn.tsx | 1 - .../components/CheckKidsInfo/CheckInfo.tsx | 6 ++-- .../src/components/Layout/index.styled.ts | 18 ++++++++++- Front-end/src/components/Layout/index.tsx | 8 +++-- Front-end/src/pages/CheckKidsinfo.tsx | 31 +++++++------------ Front-end/src/pages/Parents.tsx | 25 +++++++++------ 6 files changed, 53 insertions(+), 36 deletions(-) diff --git a/Front-end/src/components/Button/LongBtn.tsx b/Front-end/src/components/Button/LongBtn.tsx index 75557f2..ad803a9 100644 --- a/Front-end/src/components/Button/LongBtn.tsx +++ b/Front-end/src/components/Button/LongBtn.tsx @@ -49,7 +49,6 @@ const Container = styled.div<{ type: string }>` padding: 16px 0; display: flex; justify-content: center; - width: 335px; border-radius: 14px; background-color: ${({ type }) => (type === 'edit' ? '#FFFFFF' : '#A1DC2E')}; color: ${({ type }) => (type === 'edit' ? '#969696' : '#FFFFFF')}; diff --git a/Front-end/src/components/CheckKidsInfo/CheckInfo.tsx b/Front-end/src/components/CheckKidsInfo/CheckInfo.tsx index f1f4032..f5dade0 100644 --- a/Front-end/src/components/CheckKidsInfo/CheckInfo.tsx +++ b/Front-end/src/components/CheckKidsInfo/CheckInfo.tsx @@ -27,11 +27,12 @@ const Container = styled.div` padding: 18px 16px; display: flex; background-color: #ffffff; - width: 335px; border-radius: 14px; border: 1px solid #e0e5d6; gap: 16px; box-shadow: 0 0 10px 0 #5a624b29; + + margin-bottom: 16px; `; const ProfileImg = styled.img` @@ -43,11 +44,11 @@ const ProfileText = styled.div` display: flex; flex-direction: column; gap: 8px; + width: 100%; `; const Name = styled.div` padding: 9px 20px; - width: 180px; border-radius: 12px; border: 1px solid #e0e5d6; font-size: 16px; @@ -57,7 +58,6 @@ const Name = styled.div` const Birth = styled.div` padding: 9px 20px; - width: 180px; border-radius: 12px; border: 1px solid #e0e5d6; `; diff --git a/Front-end/src/components/Layout/index.styled.ts b/Front-end/src/components/Layout/index.styled.ts index eb1d7d5..1e07c39 100644 --- a/Front-end/src/components/Layout/index.styled.ts +++ b/Front-end/src/components/Layout/index.styled.ts @@ -5,9 +5,12 @@ export const ParentLayout = styled.div` width: 100%; height: calc(100vh - ${HEADER_HEIGHT}px); padding: 12px 20px 0; + + position: relative; + overflow: scroll; `; -export const ChildLayout = styled.div` +export const Body = styled.div` width: 100%; margin-top: 48px; `; @@ -27,3 +30,16 @@ export const SubTitle = styled.div<{ color: string }>` color: ${({ color }) => color}; white-space: pre-wrap; `; + +export const FooterWrapper = styled.div` + position: fixed; + bottom: 0; + left: 0; + width: 100%; + padding: 0 20px 15px; +`; + +export const MarginBottom = styled.div` + /* TODO: 40px 보장 */ + height: 180px; +`; diff --git a/Front-end/src/components/Layout/index.tsx b/Front-end/src/components/Layout/index.tsx index 4995866..25d691a 100644 --- a/Front-end/src/components/Layout/index.tsx +++ b/Front-end/src/components/Layout/index.tsx @@ -28,10 +28,14 @@ const Layout: React.FC = ({ children, hasGoback = true, title, subT {title.text} {subTitle && {subTitle.text}} - {children} + {children} + ); }; -export default Layout; +export default Object.assign(Layout, { + Body: Styled.Body, + Footer: Styled.FooterWrapper, +}); diff --git a/Front-end/src/pages/CheckKidsinfo.tsx b/Front-end/src/pages/CheckKidsinfo.tsx index 9b71cbd..aeaa039 100644 --- a/Front-end/src/pages/CheckKidsinfo.tsx +++ b/Front-end/src/pages/CheckKidsinfo.tsx @@ -16,27 +16,25 @@ const CheckKidsinfo = () => { return ( - + {parent.institution} - - - - - + + + + + + + + + + ); }; export default CheckKidsinfo; -const Contents = styled.div` - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; -`; - const Title = styled.div` margin-bottom: 16px; padding: 12px 32px; @@ -51,13 +49,8 @@ const Title = styled.div` text-align: center; `; -const BtnWrapper = styled.div` +const ButtonWrapper = styled.div` display: flex; flex-direction: column; - align-items: center; - position: absolute; - bottom: 40px; - left: 50%; - transform: translateX(-50%); gap: 8px; `; diff --git a/Front-end/src/pages/Parents.tsx b/Front-end/src/pages/Parents.tsx index ac0c51f..da7189c 100644 --- a/Front-end/src/pages/Parents.tsx +++ b/Front-end/src/pages/Parents.tsx @@ -91,13 +91,16 @@ const Parents = () => { )} - - - {isChoiced ? parent.institution : '어린이집을 선택해주세요.'} - - - + + + + {isChoiced ? parent.institution : '어린이집을 선택해주세요.'} + + + + {isChoiced && !isModalOpen && ( + // TODO: 자녀 정보 확인 컴포넌트랑 중복 자녀 정보 입력 @@ -129,12 +132,14 @@ const Parents = () => { - - - - )} + + + + + + ); };