Skip to content

Commit 819435b

Browse files
committed
Refactor: 바텀시트 데스크톱 UI의 모달 닫기 버튼 렌더링 로직 통일
1 parent 56c36d1 commit 819435b

3 files changed

Lines changed: 14 additions & 13 deletions

File tree

src/components/BottomSheet/OptionsBottomSheet/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ const OptionsBottomSheet: React.FC<OptionsBottomSheetProps> = ({
208208
setIsReportBottomSheetOpen(false);
209209
}}
210210
>
211-
<img src={closeIcon} alt="" />
211+
<img src={closeIcon} alt="닫기" />
212212
</CloseButton>
213213
</ReportModalHeader>
214214
<ReportModalBox>

src/components/BottomSheet/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ import {
55
BottomSheetLayout,
66
Handler,
77
SideBarLayout,
8-
XButton,
8+
CloseButton,
99
SideBarTopBar,
1010
ComponentBox,
1111
} from './styles';
12+
import closeIcon from '@assets/default/x.svg';
1213

1314
const BottomSheet: React.FC<BottomSheetProps> = ({
1415
isOpenBottomSheet,
@@ -150,7 +151,9 @@ const BottomSheet: React.FC<BottomSheetProps> = ({
150151
{/* 데스크탑 UI */}
151152
<SideBarLayout $isSideBarOpen={isSideBarOpen}>
152153
<SideBarTopBar>
153-
<XButton onClick={handleCloseButtonClick} />
154+
<CloseButton onClick={handleCloseButtonClick}>
155+
<img src={closeIcon} alt="닫기" />
156+
</CloseButton>
154157
</SideBarTopBar>
155158
<ComponentBox>
156159
<Component {...componentProps} />

src/components/BottomSheet/styles.tsx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from 'react';
22
import styled from 'styled-components';
3-
import XIcon from '@assets/default/x.svg';
43

54
export const BottomSheetWrapper = styled.div<{ $isBottomSheetOpen: boolean }>`
65
position: fixed;
@@ -65,18 +64,17 @@ export const SideBarLayout = styled.div<{ $isSideBarOpen: boolean }>`
6564
export const SideBarTopBar = styled.header`
6665
display: flex;
6766
width: 100%;
68-
padding: 0.5rem 1rem;
67+
padding: 1rem 1.25rem 1rem 1rem;
6968
margin-top: 0;
69+
justify-content: flex-end;
7070
`;
7171

72-
export const XButton = styled.button`
73-
width: 2.25rem;
74-
height: 2.25rem;
75-
margin: auto 0 auto auto;
76-
background-image: url(${XIcon});
77-
background-repeat: no-repeat;
78-
background-size: 17px;
79-
background-position: center;
72+
export const CloseButton = styled.button`
73+
width: 1.875rem;
74+
height: 1.875rem;
75+
display: flex;
76+
justify-content: center;
77+
align-items: center;
8078
`;
8179

8280
export const ComponentBox = styled.section`

0 commit comments

Comments
 (0)