Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#142] 등록 페이지 반응형 디자인 #162

Merged
merged 15 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/components/Register/Preview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ const PreviewContainer = styled.div`
border-radius: 20px;

box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);

${theme.response.tablet} {
display: none;
}
`;

const Header = styled.div`
Expand Down Expand Up @@ -133,7 +137,7 @@ const Coupon = styled.div`
display: flex;
flex-direction: column;
justify-content: space-between;

box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.25);

overflow: hidden;
Expand Down
19 changes: 19 additions & 0 deletions src/components/Register/StepTitle/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import styled from '@emotion/styled';

import theme from '@styles/theme';
import { StepTitleProps } from '@/types/register';

const StepTitle = ({ steps, currentStep }: StepTitleProps) => {
Expand Down Expand Up @@ -27,6 +28,20 @@ const StepTitleContainer = styled.div`
font-weight: 600;
line-height: 31px;
letter-spacing: -0.78px;

${theme.response.tablet} {
height: 7vw;

margin-top: 10px;

font-size: 3vw;
}

@media (max-width: 550px) {
height: 40px;

font-size: 16px;
}
`;

const StepTitleWrapper = styled.div`
Expand All @@ -41,4 +56,8 @@ const Description = styled.span`
font-size: 13px;
letter-spacing: 0.1px;
line-height: 150%;

${theme.response.tablet} {
display: none;
}
`;
22 changes: 22 additions & 0 deletions src/components/Register/Stepper/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,20 @@ const Number = styled.div<NumberStyleProps>`
color: #979c9e;
}
}

${theme.response.tablet} {
width: 4vw;
height: 4vw;

font-size: 2vw;
}

@media (max-width: 550px) {
width: 22px;
height: 22px;

font-size: 11px;
}
`;

const Description = styled.div`
Expand All @@ -91,10 +105,18 @@ const Description = styled.div`
color: #979c9e;
font-weight: 500;
}

${theme.response.tablet} {
display: none;
}
`;

const Line = styled.div<LineStyleProps>`
margin: 0px 40px;

display: ${props => (props.$isLastStep === 3 ? 'none' : 'block')};

${theme.response.tablet} {
margin: 0px 4vw;
}
`;
14 changes: 14 additions & 0 deletions src/components/Register/StepperController/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ const PreviousButton = styled.button<PreviousButtonStyleProps>`
background: #fff;

cursor: pointer;

${theme.response.tablet} {
width: 123px;
height: 39px;

font-size: 12px;
}
`;

const NextButton = styled.button<NextButtonStyleProps>`
Expand All @@ -135,4 +142,11 @@ const NextButton = styled.button<NextButtonStyleProps>`
props.$isFilled ? `${theme.colors.hover}` : '#cdcfd0'};

cursor: ${props => (props.$isFilled ? 'pointer' : 'default')};

${theme.response.tablet} {
width: 225px;
height: 39px;

font-size: 12px;
}
`;
34 changes: 31 additions & 3 deletions src/components/Register/Steps/FirstStep/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useRecoilState } from 'recoil';

import styled from '@emotion/styled';

import theme from '@styles/theme';
import {
InputContainer,
InputButton,
Expand Down Expand Up @@ -225,17 +225,45 @@ const Input = styled.input`
outline: none;

&::placeholder {
color: #979C9e;
color: #979c9e;
font-weight: 500;
}
}

${theme.response.tablet} {
width: 44vw;
height: 4.5vw;
min-width: 220px;
min-height: 24px;

font-size: 1.7vw;

&::placeholder {
font-size: 1.7vw;
}
}

@media (max-width: 550px) {
font-size: 9px;

&::placeholder {
font-size: 9px;
}
}
`;

const ButtonWrapper = styled.div`
margin-top: 20px;

display: flex;
gap: 23px;

${theme.response.tablet} {
gap: 3vw;
}

@media (max-width: 550px) {
gap: 16px;
}
`;

const ContentWrapper = styled.div`
Expand Down
31 changes: 29 additions & 2 deletions src/components/Register/Steps/FourthStep/Calendar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const Calendar = () => {
ref={ref}
>
<SelectedDate>{value}</SelectedDate>
<img
<CalendarIcon
src={input.startDate ? selected : notSelected}
alt="달력 아이콘"
/>
Expand All @@ -80,7 +80,7 @@ const Calendar = () => {
ref={ref}
>
<SelectedDate>{value}</SelectedDate>
<img
<CalendarIcon
src={input.endDate ? selected : notSelected}
alt="달력 아이콘"
/>
Expand Down Expand Up @@ -198,10 +198,37 @@ const CustomInput = styled.button`
background: #fff;

cursor: pointer;

${theme.response.tablet} {
width: 13.5vw;
height: 4.5vw;
min-width: 77px;
min-height: 27px;
}
`;

const SelectedDate = styled.span`
color: ${theme.colors.hover};

${theme.response.tablet} {
font-size: 1.7vw;
}

@media (max-width: 550px) {
font-size: 10px;
}
`;

const CalendarIcon = styled.img`
${theme.response.tablet} {
width: 3.7vw;
height: 3.7vw;
}

@media (max-width: 550px) {
width: 20px;
height: 20px;
}
`;

const Dash = styled.div`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ const RegisterCompleteModal = () => {
alt="등록 완료 아이콘"
/>
<Description>쿠폰이 등록되었습니다.</Description>
<CheckCoupons onClick={handleCheckButton}>
쿠폰 확인하러 가기
</CheckCoupons>
<RegisterNewCoupon onClick={handleRegisterButton}>
쿠폰 추가 등록하기
</RegisterNewCoupon>
<ButtonContainer>
<CheckCoupons onClick={handleCheckButton}>
쿠폰 확인하러 가기
</CheckCoupons>
<RegisterNewCoupon onClick={handleRegisterButton}>
쿠폰 추가 등록하기
</RegisterNewCoupon>
</ButtonContainer>
</Container>
</Backdrop>
);
Expand All @@ -57,25 +59,49 @@ const Container = styled.div`
align-items: center;

background: #fff;

${theme.response.tablet} {
width: 336px;
height: 210px;
}
`;

const CompleteIcon = styled.img`
width: 45px;
height: 45px;

${theme.response.tablet} {
width: 38px;
height: 38px;
}
`;

const Description = styled.div`
margin-top: 15px;
margin: 15px 0px 40px;

font-size: 18px;
font-weight: 600;

${theme.response.tablet} {
font-size: 15px;
}
`;

const ButtonContainer = styled.div`
display: flex;
flex-direction: column;

${theme.response.tablet} {
display: flex;
flex-direction: row;
gap: 20px;
}
`;

const CheckCoupons = styled.button`
width: 324px;
height: 47px;

margin-top: 40px;
border: none;
border-radius: 12px;

Expand All @@ -86,6 +112,17 @@ const CheckCoupons = styled.button`
background: ${theme.colors.hover};

cursor: pointer;

${theme.response.tablet} {
width: 130px;
height: 38px;

border-radius: 10px;

font-size: 12px;

background: #b1b1b1;
}
`;

const RegisterNewCoupon = styled.button`
Expand All @@ -101,4 +138,18 @@ const RegisterNewCoupon = styled.button`
background: transparent;

cursor: pointer;

${theme.response.tablet} {
width: 130px;
height: 38px;

margin-top: 0px;
border-radius: 10px;

color: #fff;
font-size: 12px;
text-decoration: none;

background: ${theme.colors.hover};
}
`;
13 changes: 13 additions & 0 deletions src/components/Register/Steps/FourthStep/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ const ContentContainer = styled.div`

const Description = styled.div`
font-size: 14px;

${theme.response.tablet} {
display: none;
}
`;

const CalendarWrapper = styled.button<CalendarWrapperStyleProps>`
Expand All @@ -77,4 +81,13 @@ const CalendarWrapper = styled.button<CalendarWrapperStyleProps>`
font-size: 15px;

cursor: pointer;

${theme.response.tablet} {
width: 36vw;
height: 5vw;
min-width: 220px;
min-height: 32px;

border-radius: 11px;
}
`;
Loading