File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- // SheetItemWithDivider에서 사용되는 Items 배열 요소
2- export interface SheetItemDto {
3- text : string ;
4- action : ( ) => void ;
5- icon ?: string ; // svg를 import하여 값으로 사용
6- }
7-
81//TODO: marginBottom prop 제거
92export interface BottomSheetMenuProps {
103 items : SheetItemDto [ ] ;
114 marginBottom ?: string ;
125}
6+
7+ export interface SheetItemDto {
8+ text : string ;
9+ action : ( ) => void ;
10+ icon ?: string ; // svg를 import하여 값으로 사용
11+ }
Original file line number Diff line number Diff line change 1- import { StyledText } from '.. /Text/StyledText' ;
2- import { BottomSheetMenuLayout , SheetItem , Icon } from './styles' ;
1+ import { StyledText } from '@components /Text/StyledText' ;
2+ import { BottomSheetMenuLayout , SheetItem , IconButton } from './styles' ;
33import { BottomSheetMenuProps , SheetItemDto } from './dto' ;
44import React from 'react' ;
55
@@ -12,7 +12,11 @@ const BottomSheetMenu: React.FC<BottomSheetMenuProps> = React.memo(({ items }) =
1212 < StyledText $textTheme = { { style : 'body1-medium' } } color = { '#7b7b7b' } >
1313 { item . text }
1414 </ StyledText >
15- { item . icon && < Icon src = { item . icon } /> }
15+ { item . icon && (
16+ < IconButton >
17+ < img src = { item . icon } alt = { `${ item . text } 아이콘` } />
18+ </ IconButton >
19+ ) }
1620 </ SheetItem >
1721 </ div >
1822 ) ) }
Original file line number Diff line number Diff line change @@ -16,7 +16,10 @@ export const SheetItem = styled.li`
1616 border-bottom: 1px solid rgb(0, 0, 0, 0.2);
1717` ;
1818
19- export const Icon = styled . img `
19+ export const IconButton = styled . button `
2020 width: 1.5rem;
2121 height: 1.5rem;
22+ display: flex;
23+ align-items: center;
24+ justify-content: center;
2225` ;
Original file line number Diff line number Diff line change @@ -184,7 +184,6 @@ const ChatRoom: React.FC = () => {
184184 icon : Block ,
185185 } ,
186186 ] ,
187- marginBottom : '4.38rem' ,
188187 } ;
189188
190189 const leaveModalProps : ModalProps = {
You can’t perform that action at this time.
0 commit comments