Skip to content

Commit 4b9b50c

Browse files
committed
feat: MemeDetailPage에서 밈 꾸미기 버튼 추가 및 스타일 수정
- 밈 꾸미기 버튼을 추가하여 사용자에게 커스터마이징 기능 제공 - 버튼 스타일을 개선하고, 버튼 간의 간격 및 패딩 조정 - 버튼의 배경색 및 호버 효과를 수정하여 시각적 일관성 향상
1 parent a4e1aa6 commit 4b9b50c

File tree

2 files changed

+28
-21
lines changed

2 files changed

+28
-21
lines changed

apps/web/src/pages/MemeDetailPage/MemeDetailPage.styles.ts

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,35 +26,41 @@ const Image = styled.img`
2626

2727
const ButtonContainer = styled.div`
2828
position: fixed;
29-
max-width: 425px;
29+
max-width: ${({ theme }) => theme.breakpoints.mobile};
3030
left: 50%;
3131
transform: translateX(-50%);
3232
bottom: 0;
3333
width: 100%;
34-
padding: 24px 14px;
34+
padding: 12px 14px;
3535
background-color: ${({ theme }) => theme.palette.gray['gray-10']};
3636
border-top: 1px solid ${({ theme }) => theme.palette.gray['gray-9']};
3737
display: flex;
38-
gap: 10px;
38+
gap: 8px;
3939
z-index: 10;
4040
`;
4141

42-
const ActionButton = styled.button`
43-
flex: 1;
42+
interface ActionButtonProps {
43+
isPrimary?: boolean;
44+
}
45+
46+
const ActionButton = styled.button<ActionButtonProps>`
47+
flex: ${({ isPrimary }) => (isPrimary ? 1 : 2)};
4448
display: flex;
4549
align-items: center;
4650
justify-content: center;
4751
gap: 4px;
48-
background-color: ${({ theme }) => theme.palette.gray['gray-9']};
49-
border: 1px solid ${({ theme }) => theme.palette.gray['gray-8']};
50-
border-radius: 10px;
52+
background-color: ${({ theme, isPrimary }) =>
53+
isPrimary ? theme.palette.gray['gray-9'] : theme.palette.main.pink[50]};
54+
border: none;
55+
border-radius: 8px;
5156
cursor: pointer;
52-
padding: 14px;
57+
padding: 12px;
5358
${({ theme }) => theme.typography.title.subhead2};
5459
color: ${({ theme }) => theme.palette.common.white};
5560
5661
&:hover {
57-
background-color: ${({ theme }) => theme.palette.gray['gray-8']};
62+
background-color: ${({ theme, isPrimary }) =>
63+
isPrimary ? theme.palette.gray['gray-8'] : theme.palette.main.pink[40]};
5864
}
5965
`;
6066

apps/web/src/pages/MemeDetailPage/index.tsx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,18 @@ const MemeDetailPage = () => {
8989
</S.ContentContainer>
9090
</S.Container>
9191
<S.ButtonContainer>
92+
<S.ActionButton
93+
isPrimary
94+
onClick={() => {
95+
nativeBridge.customMeme({
96+
title: memeDetail?.success.title ?? '',
97+
image: memeDetail?.success.imgUrl ?? '',
98+
});
99+
}}
100+
>
101+
<MemeDesignPenIcon />
102+
<span>밈 꾸미기</span>
103+
</S.ActionButton>
92104
<S.ActionButton
93105
onClick={() => {
94106
if (isWebview) {
@@ -104,17 +116,6 @@ const MemeDetailPage = () => {
104116
<ShareIcon />
105117
<span>공유하기</span>
106118
</S.ActionButton>
107-
<S.ActionButton
108-
onClick={() => {
109-
nativeBridge.customMeme({
110-
title: memeDetail?.success.title ?? '',
111-
image: memeDetail?.success.imgUrl ?? '',
112-
});
113-
}}
114-
>
115-
<MemeDesignPenIcon />
116-
<span>밈 꾸미기</span>
117-
</S.ActionButton>
118119
</S.ButtonContainer>
119120
</Layout>
120121
);

0 commit comments

Comments
 (0)