-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TwoButtonModal을 기존의 Modal 컴포넌트로 대체 #721
Changes from 4 commits
a3237c3
4e366b7
7d8ecde
647eb7a
6e5e413
8c12936
72e69dc
3edbc94
cdb44d7
1d6e46a
00c2dae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { styled } from 'styled-components'; | ||
|
||
export const ModalBody = styled.p` | ||
padding: 20px; | ||
`; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import TwoButtonModal from '../../common/TwoButtonModal'; | ||
import Modal from '../Modal'; | ||
|
||
import * as S from './style'; | ||
|
||
export type TargetForDelete = 'MEMBERSHIP' | 'POST' | 'COMMENT'; | ||
|
||
const TARGET_FOR_DELETE: Record<TargetForDelete, string> = { | ||
MEMBERSHIP: '계정을', | ||
POST: '게시글을', | ||
COMMENT: '댓글을', | ||
MEMBERSHIP: '계정', | ||
POST: '게시글', | ||
COMMENT: '댓글', | ||
}; | ||
|
||
interface DeleteModalProps { | ||
|
@@ -29,8 +29,8 @@ export default function DeleteModal({ | |
}; | ||
|
||
return ( | ||
<TwoButtonModal | ||
title={`${TARGET_FOR_DELETE[target]} 삭제하기`} | ||
<Modal | ||
title={`${TARGET_FOR_DELETE[target]} 삭제`} | ||
primaryButton={{ | ||
text: '삭제', | ||
handleClick: handlePrimaryButtonClick, | ||
|
@@ -42,7 +42,7 @@ export default function DeleteModal({ | |
> | ||
<S.Description | ||
tabIndex={0} | ||
>{`${TARGET_FOR_DELETE[target]} 삭제하시겠습니까?\n${TARGET_FOR_DELETE[target]} 삭제하면 취소할 수 없습니다.`}</S.Description> | ||
</TwoButtonModal> | ||
>{`${TARGET_FOR_DELETE[target]} 삭제하시겠습니까?\n삭제 버튼 클릭 시 취소할 수 없습니다.`}</S.Description> | ||
</Modal> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 혹시 이렇게 되면 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 넵 맞습니다~ |
||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
import { styled } from 'styled-components'; | ||
|
||
import { theme } from '@styles/theme'; | ||
|
||
export const Description = styled.p` | ||
padding: 0 20px; | ||
|
||
color: #67727e; | ||
|
||
font: var(--text-caption); | ||
font-size: 14px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. --text-caption을 바꾸신 이유가 궁금해요 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
white-space: pre-wrap; | ||
|
||
@media (min-width: ${theme.breakpoint.sm}) { | ||
font: var(--text-body); | ||
} | ||
`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
훨씬 깔끔해졌어요!