Skip to content

Commit 305bc76

Browse files
committed
chore: 컴포넌트 테스트 페이지 추가
1 parent 60c5be2 commit 305bc76

File tree

2 files changed

+88
-1
lines changed

2 files changed

+88
-1
lines changed

apps/pyconkr/src/components/pages/test.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ import { Button, Stack } from "@mui/material";
22
import * as React from "react";
33

44
import { BackendTestPage } from "../../debug/page/backend_test";
5+
import { ComponentTestPage } from "../../debug/page/component_test";
56
import { MapTestPage } from "../../debug/page/map_test";
67
import { MdiTestPage } from "../../debug/page/mdi_test";
78
import { ShopTestPage } from "../../debug/page/shop_test";
89

910
const LOCAL_STORAGE_KEY = "selectedTab";
10-
type SelectedTabType = "shop" | "mdi" | "backend" | "map";
11+
type SelectedTabType = "shop" | "mdi" | "backend" | "map" | "component";
1112

1213
const getTabFromLocalStorage = (): SelectedTabType =>
1314
(localStorage.getItem(LOCAL_STORAGE_KEY) as SelectedTabType) || "shop";
@@ -22,6 +23,7 @@ const TabList: { [key in SelectedTabType]: React.ReactNode } = {
2223
mdi: <MdiTestPage />,
2324
backend: <BackendTestPage />,
2425
map: <MapTestPage />,
26+
component: <ComponentTestPage />,
2527
};
2628

2729
export const Test: React.FC = () => {
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
import * as Common from "@frontend/common";
2+
import { Chip, Stack, Table, TableBody, TableCell, TableRow } from "@mui/material";
3+
import * as React from "react";
4+
5+
const HighlightedChip: React.FC<{ label: string }> = ({ label }) => (
6+
<Chip
7+
label={label}
8+
sx={(theme) => ({
9+
borderColor: theme.palette.highlight.light,
10+
backgroundColor: theme.palette.highlight.main,
11+
color: "#fff",
12+
fontWeight: 600,
13+
})}
14+
/>
15+
);
16+
17+
export const ComponentTestPage: React.FC = () => {
18+
return (
19+
<Stack direction="column" spacing={2} sx={{ p: 2 }}>
20+
<Common.Components.MDX.PrimaryStyledDetails summary="자가용 이용시">
21+
모든 자동차의 출입은 동국대 정문으로만 가능
22+
<Table>
23+
<TableBody>
24+
<TableRow>
25+
<TableCell>
26+
<HighlightedChip label="분당방면" />
27+
</TableCell>
28+
<TableCell>한남대교 → 남산국립극장 400m 전방 → 동국대 정문</TableCell>
29+
</TableRow>
30+
<TableRow>
31+
<TableCell>
32+
<HighlightedChip label="강남방면" />
33+
</TableCell>
34+
<TableCell>동호대교 → 장충체육관 앞 사거리에서 좌회전 300m 전방 → 동국대 정문</TableCell>
35+
</TableRow>
36+
<TableRow>
37+
<TableCell>
38+
<HighlightedChip label="용산방면" />
39+
</TableCell>
40+
<TableCell>남산 2호터널 통과 후 좌회전 100m 전방 → 동국대 정문</TableCell>
41+
</TableRow>
42+
<TableRow>
43+
<TableCell>
44+
<HighlightedChip label="동대문방면" />
45+
</TableCell>
46+
<TableCell>장충사거리 200m 전방 → 동국대 정문</TableCell>
47+
</TableRow>
48+
</TableBody>
49+
</Table>
50+
</Common.Components.MDX.PrimaryStyledDetails>
51+
52+
<Common.Components.MDX.SecondaryStyledDetails summary="자가용 이용시">
53+
모든 자동차의 출입은 동국대 정문으로만 가능
54+
<Table>
55+
<TableBody>
56+
<TableRow>
57+
<TableCell>
58+
<HighlightedChip label="분당방면" />
59+
</TableCell>
60+
<TableCell>한남대교 → 남산국립극장 400m 전방 → 동국대 정문</TableCell>
61+
</TableRow>
62+
<TableRow>
63+
<TableCell>
64+
<HighlightedChip label="강남방면" />
65+
</TableCell>
66+
<TableCell>동호대교 → 장충체육관 앞 사거리에서 좌회전 300m 전방 → 동국대 정문</TableCell>
67+
</TableRow>
68+
<TableRow>
69+
<TableCell>
70+
<HighlightedChip label="용산방면" />
71+
</TableCell>
72+
<TableCell>남산 2호터널 통과 후 좌회전 100m 전방 → 동국대 정문</TableCell>
73+
</TableRow>
74+
<TableRow>
75+
<TableCell>
76+
<HighlightedChip label="동대문방면" />
77+
</TableCell>
78+
<TableCell>장충사거리 200m 전방 → 동국대 정문</TableCell>
79+
</TableRow>
80+
</TableBody>
81+
</Table>
82+
</Common.Components.MDX.SecondaryStyledDetails>
83+
</Stack>
84+
);
85+
};

0 commit comments

Comments
 (0)