Skip to content

Commit e02bac3

Browse files
authored
Merge pull request #84 from MINYOUNG-SEOK/develop
style: 등록페이지 반응형 추가
2 parents 1a3bb4c + e20be8f commit e02bac3

File tree

6 files changed

+42
-20
lines changed

6 files changed

+42
-20
lines changed

src/entities/projects/ui/project-insert/ProjectDetailDescriptionCard.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { TextField } from "@mui/material";
2+
import { useMediaQuery } from "@mui/material";
23
import { useTheme } from "@mui/material/styles";
34
import type { ChangeEvent, CSSProperties, JSX } from "react";
45

@@ -18,6 +19,7 @@ const ProjectDetailDescriptionCard = ({
1819
style,
1920
}: ProjectDetailDescriptionCardProps): JSX.Element => {
2021
const theme = useTheme();
22+
const isMobile = useMediaQuery(theme.breakpoints.down("md"));
2123

2224
const handleChange = (e: ChangeEvent<HTMLTextAreaElement>): void => {
2325
onChange(e.target.value);
@@ -52,9 +54,11 @@ AI 기술을 활용하여 개인별 학습 패턴을 분석하고, 최적화된
5254
variant="outlined"
5355
sx={{
5456
"& .MuiOutlinedInput-root": {
55-
fontSize: large
56-
? theme.typography.h5.fontSize
57-
: theme.typography.body1.fontSize,
57+
fontSize: isMobile
58+
? theme.typography.body2.fontSize
59+
: large
60+
? theme.typography.h5.fontSize
61+
: theme.typography.body1.fontSize,
5862
fontFamily: "monospace",
5963
lineHeight: 1.6,
6064
padding: 0,

src/entities/projects/ui/project-insert/ProjectPreferentialCard.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import AddIcon from "@mui/icons-material/Add";
22
import { Box, Button } from "@mui/material";
3+
import { useMediaQuery } from "@mui/material";
34
import { useTheme } from "@mui/material/styles";
45
import type {
56
ChangeEvent,
@@ -27,6 +28,7 @@ const ProjectPreferentialCard = ({
2728
style,
2829
}: ProjectPreferentialCardProps): JSX.Element => {
2930
const theme = useTheme();
31+
const isMobile = useMediaQuery(theme.breakpoints.down("md"));
3032
const [newPreferential, setNewPreferential] = useState("");
3133

3234
const addPreferential = (): void => {
@@ -70,9 +72,11 @@ const ProjectPreferentialCard = ({
7072
height: 40,
7173
borderRadius: theme.shape.borderRadius,
7274
border: `1px solid ${theme.palette.divider}`,
73-
fontSize: large
74-
? theme.typography.h5.fontSize
75-
: theme.typography.body1.fontSize,
75+
fontSize: isMobile
76+
? theme.typography.body2.fontSize
77+
: large
78+
? theme.typography.h5.fontSize
79+
: theme.typography.body1.fontSize,
7680
fontFamily: theme.typography.fontFamily,
7781
background: theme.palette.background.paper,
7882
padding: large ? theme.spacing(2.2) : theme.spacing(1.7),

src/entities/projects/ui/project-insert/ProjectRequirementsCard.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import AddIcon from "@mui/icons-material/Add";
22
import DeleteIcon from "@mui/icons-material/Delete";
33
import { Box, IconButton, TextField, Button } from "@mui/material";
4+
import { useMediaQuery } from "@mui/material";
45
import { useTheme } from "@mui/material/styles";
56
import type { ChangeEvent, CSSProperties, JSX } from "react";
67

@@ -20,6 +21,7 @@ const ProjectRequirementsCard = ({
2021
style,
2122
}: ProjectRequirementsCardProps): JSX.Element => {
2223
const theme = useTheme();
24+
const isMobile = useMediaQuery(theme.breakpoints.down("md"));
2325

2426
const displayValue = value;
2527

@@ -72,9 +74,11 @@ const ProjectRequirementsCard = ({
7274
sx={{
7375
"& .MuiOutlinedInput-root": {
7476
height: 40,
75-
fontSize: large
76-
? theme.typography.h5.fontSize
77-
: theme.typography.body1.fontSize,
77+
fontSize: isMobile
78+
? theme.typography.body2.fontSize
79+
: large
80+
? theme.typography.h5.fontSize
81+
: theme.typography.body1.fontSize,
7882
fontFamily: theme.typography.fontFamily,
7983
background: "none",
8084
border: "none",

src/entities/projects/ui/project-insert/ProjectSimpleDescCard.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,15 @@ const ProjectSimpleDescCard = ({
5151
},
5252
},
5353
"& .MuiOutlinedInput-input": {
54-
padding: large ? 5 : 5,
55-
fontSize: 16,
56-
color: "#222",
54+
padding: large ? theme.spacing(2.2) : theme.spacing(1.7),
55+
"&::placeholder": {
56+
fontSize: {
57+
xs: "14px",
58+
sm: "15px",
59+
md: "16px",
60+
},
61+
color: "#999",
62+
},
5763
},
5864
}}
5965
required

src/entities/projects/ui/project-insert/ProjectWorkflowCard.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { FormControl, Select, MenuItem } from "@mui/material";
21
import type { SelectChangeEvent } from "@mui/material";
2+
import { FormControl, Select, MenuItem } from "@mui/material";
3+
import { useMediaQuery } from "@mui/material";
34
import { useTheme } from "@mui/material/styles";
45
import type { CSSProperties, JSX } from "react";
56

@@ -43,6 +44,7 @@ export default function ProjectWorkflowCard({
4344
style,
4445
}: ProjectWorkflowCardProps): JSX.Element {
4546
const theme = useTheme();
47+
const isMobile = useMediaQuery(theme.breakpoints.down("md"));
4648

4749
const handleChange = (event: SelectChangeEvent<Workflow>): void => {
4850
onChange(event.target.value as Workflow);
@@ -62,9 +64,11 @@ export default function ProjectWorkflowCard({
6264
size={large ? "medium" : "small"}
6365
displayEmpty
6466
sx={{
65-
fontSize: large
66-
? theme.typography.h5.fontSize
67-
: theme.typography.body1.fontSize,
67+
fontSize: isMobile
68+
? theme.typography.body2.fontSize
69+
: large
70+
? theme.typography.h5.fontSize
71+
: theme.typography.body1.fontSize,
6872
fontFamily: theme.typography.fontFamily,
6973
padding: large ? theme.spacing(2.2) : theme.spacing(1.7),
7074

src/pages/project-insert/ui/ProjectInsertPage.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { CSSObject } from "@emotion/react";
2-
import { Button, Container } from "@mui/material";
2+
import { Container } from "@mui/material";
33
import type { ContainerProps } from "@mui/material/Container";
44
import type { Theme } from "@mui/material/styles";
55
import { styled } from "@mui/material/styles";
@@ -16,7 +16,7 @@ import Step3 from "@features/projects/ui/project-insert/Step3";
1616
import Step4 from "@features/projects/ui/project-insert/Step4";
1717

1818
const ProjectInsertPage = (): JSX.Element => {
19-
const { currentStep, updateForm, goPrevPageforTest } = useProjectInsert();
19+
const { currentStep, updateForm } = useProjectInsert();
2020

2121
return (
2222
<MainContainer>
@@ -28,9 +28,9 @@ const ProjectInsertPage = (): JSX.Element => {
2828
{currentStep === 3 && <Step3 updateForm={updateForm} />}
2929
{currentStep === 4 && <Step4 updateForm={updateForm} />}
3030

31-
<Button variant="contained" color="inherit" onClick={goPrevPageforTest}>
31+
{/* <Button variant="contained" color="inherit" onClick={goPrevPageforTest}>
3232
이것은 테스트용 뒤로가기 버튼입니다. 배포시에는 해당 버튼을 삭제해주세요
33-
</Button>
33+
</Button> */}
3434

3535
<HoneyTipBox />
3636
</MainContainer>

0 commit comments

Comments
 (0)