Skip to content

Commit 4285bef

Browse files
이모티콘 모달창 및 공유 모달창 반응형으로 변경
1 parent 84fb751 commit 4285bef

File tree

2 files changed

+33
-12
lines changed

2 files changed

+33
-12
lines changed

src/components/common/Emoji/Emoji.jsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ const AllEmojisContainer = styled.div`
243243
const MoreEmojisWrapper = styled.div`
244244
z-index: 10;
245245
position: absolute;
246-
top: -16px;
247-
right: -82px;
246+
top: 100%;
247+
right: -106px;
248248
width: 312px;
249249
background-color: ${(props) => props.theme.colors.white};
250250
border: 1px solid ${(props) => props.theme.colors.grayScale[300]};
@@ -254,8 +254,16 @@ const MoreEmojisWrapper = styled.div`
254254
display: grid;
255255
grid-template-columns: repeat(4, 1fr);
256256
grid-gap: 10px;
257+
margin-top: -14px;
258+
@media (max-width: 1199px) {
259+
right: -54px;
260+
}
261+
@media (max-width: 767px) {
262+
right: -156px;
263+
}
257264
`;
258265

266+
259267
const AllEmojiItem = styled.div`
260268
display: flex;
261269
align-items: center;

src/components/common/InformationBar/InformationBar.jsx

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ function InformationBar({
120120
setRecipientData={setRecipientData}
121121
/>
122122
<Separator />
123-
123+
<ShareContainer>
124+
124125
<IconButton ref={buttonRef} onClick={toggleModal}
125126
image="share" width="56" height="40"/>
126127

@@ -130,6 +131,7 @@ function InformationBar({
130131
<Option onClick={handleCopyUrl}>URL 공유</Option>
131132
</Modal>
132133
)}
134+
</ShareContainer>
133135
</RightSection>
134136
</InformationBarContainer>
135137

@@ -150,7 +152,10 @@ function InformationBar({
150152
</InformationBarWrapper>
151153
);
152154
}
153-
155+
const ShareContainer = styled.div`
156+
position: relative;
157+
display: inline-block; // 버튼 크기에 맞게 조정
158+
`;
154159

155160
const LeftSeparator = styled.span`
156161
display: inline-block;
@@ -235,7 +240,7 @@ const RightSection = styled.div`
235240
@media (max-width: 767px) {
236241
margin-top:-8px;
237242
justify-content: center;
238-
gap: 20px;
243+
gap: 10px;
239244
}
240245
`;
241246

@@ -336,9 +341,11 @@ const Avatar = styled.div`
336341
`;
337342

338343
const Modal = styled.div`
339-
padding: 10px 1px;
340344
position: absolute;
341-
top: 122px;
345+
padding: 12px 0px;
346+
right:0px;
347+
margin-top:10px;
348+
top: 100%;
342349
background-color: ${({ theme }) => theme.colors.white};
343350
width: 140px;
344351
height: 120px;
@@ -357,16 +364,22 @@ const Modal = styled.div`
357364
transform: scale(1);
358365
}
359366
}
360-
367+
@@media (max-width: 1199px) {
368+
right:7%;
369+
bottom: 100%;
370+
width: 140px;
371+
height: 120px;
372+
}
361373
@media (max-width: 767px) {
362-
top: 100px;
363-
width: 120px;
364-
height: 100px;
374+
right:7%;
375+
bottom: 100%;
376+
width: 140px;
377+
height: 120px;
365378
}
366379
`;
367380

368381
const Option = styled.div`
369-
padding: 10px;
382+
padding: 12px;
370383
cursor: pointer;
371384
font-family: "Pretendard", sans-serif;
372385
font-weight: 400;

0 commit comments

Comments
 (0)