From dffdd2a170995079312c5e6cb2aa0e952a21c3fd Mon Sep 17 00:00:00 2001 From: WithJo Date: Wed, 28 Aug 2024 22:58:09 +0900 Subject: [PATCH] =?UTF-8?q?style:=20=EC=8A=A4=ED=83=80=EC=9D=BC=20?= =?UTF-8?q?=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/SelectPage.style.ts | 94 ++++++++++++++++++----------------- src/pages/SelectPage.tsx | 17 ++++--- 2 files changed, 58 insertions(+), 53 deletions(-) diff --git a/src/pages/SelectPage.style.ts b/src/pages/SelectPage.style.ts index 0515e99..8a9d466 100644 --- a/src/pages/SelectPage.style.ts +++ b/src/pages/SelectPage.style.ts @@ -2,57 +2,26 @@ import { motion } from "framer-motion"; import styled from "@emotion/styled"; -export const SelectPageContainer = styled.div` +export const SelectPageWrapper = styled.div` display: flex; flex-direction: column; - justify-content: center; - align-items: center; - overflow: hidden; - height: 100%; -`; - -export const OptionLeft = styled(motion.div)` - display: flex; - justify-content: center; - align-items: center; - width: 100%; - height: 100%; - padding: 10px 20px; - overflow: hidden; /* 내용이 넘치면 숨김 */ - white-space: nowrap; /* 텍스트를 한 줄로 유지 */ - text-overflow: clip; /* 텍스트가 넘치면 그냥 잘라냄 */ - background-color: #d9d9d9; - color: #000; - border-radius: 0 15px 15px 0; `; -export const OptionRight = styled(motion.div)` +export const SelectPageContainer = styled.div` display: flex; - justify-content: center; + flex-direction: column; + justify-content: flex-start; align-items: center; - width: 100%; - height: 100%; - padding: 10px 20px; - overflow: hidden; /* 내용이 넘치면 숨김 */ - white-space: nowrap; /* 텍스트를 한 줄로 유지 */ - text-overflow: clip; /* 텍스트가 넘치면 그냥 잘라냄 */ - background-color: #37cdcd; - color: #fff; - border-radius: 15px 0 0 15px; -`; - -export const OptionWrapper = styled.div` + margin-top: 8vh; + overflow: hidden; height: 100%; - display: flex; - justify-content: center; - align-items: center; `; export const Item = styled(motion.div)` position: relative; background-color: #fff; - width: 80vw; - max-width: 400px; + width: min(80vw, 400px); + aspect-ratio: 3 / 4; /* 가로 세로 비율을 4:3으로 설정 */ border-radius: 20px; background-size: cover; @@ -64,27 +33,62 @@ export const ItemWrapper = styled(motion.div)` justify-content: center; align-items: center; position: relative; - padding: 80px; `; export const CardWrapper = styled.div` display: flex; justify-content: space-between; - width: 100%; height: auto; - margin-top: 20px; `; export const CardContainer = styled.div` display: flex; flex-direction: column; align-items: center; + gap: 3rem; `; -export const SelectPageWrapper = styled.div` +export const OptionWrapper = styled.div` + position: fixed; + bottom: 3rem; + width: min(100%, 800px); display: flex; - flex-direction: column; - justify-content: space-around; + justify-content: space-between; +`; + +export const OptionContainer = styled.div` + display: flex; + justify-content: center; + align-items: center; +`; + +export const OptionLeft = styled(motion.div)` + display: flex; + justify-content: center; + align-items: center; + width: 100%; height: 100%; + padding: 10px 20px; + overflow: hidden; /* 내용이 넘치면 숨김 */ + white-space: nowrap; /* 텍스트를 한 줄로 유지 */ + text-overflow: clip; /* 텍스트가 넘치면 그냥 잘라냄 */ + background-color: #d9d9d9; + color: #000; + border-radius: 0 15px 15px 0; +`; + +export const OptionRight = styled(motion.div)` + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 100%; + padding: 10px 20px; + overflow: hidden; /* 내용이 넘치면 숨김 */ + white-space: nowrap; /* 텍스트를 한 줄로 유지 */ + text-overflow: clip; /* 텍스트가 넘치면 그냥 잘라냄 */ + background-color: #37cdcd; + color: #fff; + border-radius: 15px 0 0 15px; `; export const ModalOverlay = styled.div` diff --git a/src/pages/SelectPage.tsx b/src/pages/SelectPage.tsx index ca4756e..59d2765 100644 --- a/src/pages/SelectPage.tsx +++ b/src/pages/SelectPage.tsx @@ -23,6 +23,7 @@ import { OptionWrapper, OptionLeft, OptionRight, + OptionContainer, } from "./SelectPage.style"; import ProgressBar from "@ramonak/react-progress-bar"; @@ -95,11 +96,11 @@ export default function SelectPage() { )} -
- + + - - + + {questions[currentQuestionIndex].option[1]} - -
+ +