Skip to content

Commit

Permalink
style : 일기 작성 페이지 반응형 디자인 적용 (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmlim0070 authored Nov 7, 2024
1 parent 265b9ac commit b720327
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 12 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
27 changes: 24 additions & 3 deletions src/entities/KeywordButton/ui/KeywordButton.styled.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
import styled from 'styled-components';

const breakpoints = {
mobile: '550px',
desktop: '1024px'
};

const media = {
mobile: `@media screen and (min-width: ${breakpoints.mobile})`,
desktop: `@media screen and (min-width: ${breakpoints.desktop})`
};

export const StyledButton = styled.button<{ isActive: boolean }>`
width: 175px;
height: 134px;
width: 150px;
height: 50px;
${media.mobile} {
width: 150px;
height: 50px;
}
${media.desktop} {
width: 175px;
height: 134px;
gap: 10px;
}
border: 1px solid
${(props) =>
props.isActive ? 'rgba(0, 0, 0, 0.4)' : 'rgba(0, 0, 0, 0.1)'};
Expand All @@ -12,7 +34,6 @@ export const StyledButton = styled.button<{ isActive: boolean }>`
flex-direction: column;
align-items: center;
justify-content: center;
gap: 10px;
font-size: 14px;
font-family: 'Pretendard', sans-serif;
transition: all 0.2s ease;
Expand Down
25 changes: 23 additions & 2 deletions src/entities/condition/ui/ConditionButton.styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ interface ButtonProps {
isActive?: boolean;
}

const breakpoints = {
mobile: '550px',
desktop: '1024px'
};

const media = {
mobile: `@media screen and (min-width: ${breakpoints.mobile})`,
desktop: `@media screen and (min-width: ${breakpoints.desktop})`
};

export const Container = styled.div`
display: flex;
flex-direction: row;
Expand All @@ -15,8 +25,19 @@ export const StyledButton = styled.button<ButtonProps>`
display: flex;
align-items: center;
justify-content: center;
width: 180px;
height: 60px;
width: 90px;
height: 50px;
${media.mobile} {
width: 90px;
height: 50px;
}
${media.desktop} {
width: 180px;
height: 60px;
}
border-radius: 5px;
transition: all 0.2s ease;
background-color: ${(props) => (props.isActive ? '#FFF4F1' : '#ffffff')};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const Container = styled.div`
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
justify-content: center;
gap: 0.5rem;
flex-wrap: wrap;
`;
20 changes: 19 additions & 1 deletion src/features/diary-write/emotion/ui/EmotionButtonGroup.styled.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
import styled from 'styled-components';

const breakpoints = {
mobile: '550px',
desktop: '1024px'
};

const media = {
mobile: `@media screen and (min-width: ${breakpoints.mobile})`,
desktop: `@media screen and (min-width: ${breakpoints.desktop})`
};

export const EmotionButtonContainer = styled.div`
max-width: 960px;
display: flex;
Expand All @@ -11,11 +21,19 @@ export const EmotionButtonContainer = styled.div`

export const Container = styled.div`
display: flex;
flex-direction: row;
flex-direction: column;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 30px;
${media.mobile} {
flex-direction: column;
}
${media.desktop} {
flex-direction: row;
}
`;

export const MainKeywordContainer = styled.div`
Expand Down
24 changes: 22 additions & 2 deletions src/pages/DiaryWritePage/ui/DiaryWritePage.styled.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
import styled from 'styled-components';

const breakpoints = {
mobile: '550px',
desktop: '1024px'
};

const media = {
mobile: `@media screen and (min-width: ${breakpoints.mobile})`,
desktop: `@media screen and (min-width: ${breakpoints.desktop})`
};

export const Container = styled.div`
display: flex;
flex-direction: column;
Expand All @@ -11,8 +21,18 @@ export const Section = styled.div`
display: flex;
flex-direction: column;
align-items: center;
width: 960px;
gap: 200px;
width: 90%;
gap: 50px;
${media.mobile} {
width: 90%;
gap: 50px;
}
${media.desktop} {
max-width: 960px;
gap: 200px;
}
`;

export const DisabledOverlay = styled.div<{ disabled: boolean }>`
Expand Down
21 changes: 19 additions & 2 deletions src/shared/EmotionIcon/ui/EmotionIcon.styled.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
import styled from 'styled-components';

const breakpoints = {
mobile: '550px',
desktop: '1024px'
};

const media = {
mobile: `@media screen and (min-width: ${breakpoints.mobile})`,
desktop: `@media screen and (min-width: ${breakpoints.desktop})`
};

export const StyledEmotionIcon = styled.div<{ width: string; height: string }>`
position: relative;
width: ${({ width }) => width};
height: ${({ height }) => height};
${media.mobile} {
}
${media.desktop} {
width: ${({ width }) => width};
height: ${({ height }) => height};
}
& > img {
position: absolute;
top: 0;
Expand Down
1 change: 0 additions & 1 deletion src/widgets/date-picker/ui/DatePicker.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import 'react-calendar/dist/Calendar.css';

export const StyledCalendarWrapper = styled.div`
position: relative;
width: 330px;
display: flex;
justify-content: right;
`;
Expand Down
1 change: 1 addition & 0 deletions src/widgets/header/ui/Header.styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const Container = styled.header`
export const Logo = styled.div`
display: flex;
cursor: pointer;
padding: 0 10px 0 10px;
`;

export const Nav = styled.nav`
Expand Down

0 comments on commit b720327

Please sign in to comment.