Skip to content

Commit 35a1334

Browse files
committed
feat: accordion 움직임 marquee 라이브러리로 구현
1 parent 9ca4163 commit 35a1334

File tree

3 files changed

+40
-16
lines changed

3 files changed

+40
-16
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"react": "^19.1.0",
5555
"react-confetti": "^6.4.0",
5656
"react-dom": "^19.1.0",
57+
"react-fast-marquee": "^1.6.5",
5758
"react-hook-form": "^7.58.0",
5859
"react-lottie": "^1.2.10",
5960
"react-router-dom": "^7.6.0",

packages/common/src/components/mdx_components/mobile_accordion.tsx

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import styled from "@emotion/styled";
22
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
33
import { AccordionDetails, AccordionSummary, Accordion as MuiAccordion, Stack, Typography } from "@mui/material";
44
import * as React from "react";
5+
import Marquee from "react-fast-marquee";
56
import PyCon2025HostLogoBig from "../../assets/pyconkr2025_hostlogo_big.png";
67
import PyCon2025HostLogoSmall from "../../assets/pyconkr2025_hostlogo_small.png";
78

@@ -10,19 +11,31 @@ const AccordionExpandedStyle: React.CSSProperties = {
1011
overflow: "hidden",
1112
};
1213

14+
const MarqueeAccordion: React.FC = () => {
15+
return (
16+
<Marquee loop={0}>
17+
<Stack direction={"row"} sx={{ gap: "1.5rem" }}>
18+
<Stack direction={"row"} sx={{ gap: "1.5rem" }}>
19+
<StyledTypography>{"AUG 15 - 17"}</StyledTypography>
20+
<img src={PyCon2025HostLogoSmall} />
21+
</Stack>
22+
<Stack direction={"row"} sx={{ gap: "1.5rem" }}>
23+
<StyledTypography>{"AUG 15 - 17"}</StyledTypography>
24+
<img src={PyCon2025HostLogoSmall} />
25+
</Stack>
26+
</Stack>
27+
</Marquee>
28+
);
29+
};
30+
1331
export const MobilePageAccordion: React.FC = () => {
1432
const [expanded, setExpanded] = React.useState<boolean>(false);
1533

1634
return (
1735
<AccordionWrapper>
1836
<StyledAccordion expanded={expanded} onChange={() => setExpanded((prev) => !prev)}>
19-
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
20-
{expanded ? null : (
21-
<Stack direction={"row"} sx={{ gap: "1rem" }}>
22-
<Typography>{"AUG 15 - 17"}</Typography>
23-
<img src={PyCon2025HostLogoSmall} />
24-
</Stack>
25-
)}
37+
<AccordionSummary sx={{ display: "flex" }} expandIcon={<ExpandMoreIcon />}>
38+
{expanded ? null : <MarqueeAccordion />}
2639
</AccordionSummary>
2740
<StyledAccordionDetails>
2841
{expanded ? (
@@ -91,15 +104,11 @@ const StyledAccordion = styled(MuiAccordion)`
91104
}
92105
`;
93106

94-
const Number = styled.span`
95-
font-size: 18px;
96-
font-weight: 400;
97-
`;
98-
99-
const Question = styled.span`
100-
font-size: 18px;
101-
font-weight: 400;
102-
margin-left: 60px;
107+
const StyledTypography = styled(Typography)`
108+
font-weight: 600;
109+
font-size: 1rem;
110+
color: #938a85;
111+
text-align: center;
103112
`;
104113

105114
const StyledAccordionDetails = styled(AccordionDetails)`

pnpm-lock.yaml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)