Skip to content

Commit ea1f7cc

Browse files
committed
[Feat] TPopUp 디자인 시스템 수정 반영
1 parent 186c6b0 commit ea1f7cc

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

TnT/Projects/DesignSystem/Sources/Components/PopUp/TPopUpAlertState.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,26 @@ public struct TPopupAlertState: Equatable {
1515
public var title: String
1616
/// 팝업 메시지 (옵션)
1717
public var message: String?
18+
/// 팝업의 경고 아이콘 표시 (옵션)
19+
public var showAlertIcon: Bool
1820
/// 팝업에 표시될 버튼 배열
1921
public var buttons: [ButtonState]
2022

2123
/// TPopupAlertState 초기화 메서드
2224
/// - Parameters:
2325
/// - title: 팝업의 제목
2426
/// - message: 팝업의 메시지 (선택 사항, 기본값: `nil`)
27+
/// - showAlertIcon: 팝업의 경고 아이콘 표시 (기본값: `false`)
2528
/// - buttons: 팝업에 표시할 버튼 배열 (기본값: 빈 배열)
2629
public init(
2730
title: String,
2831
message: String? = nil,
32+
showAlertIcon: Bool = false,
2933
buttons: [ButtonState] = []
3034
) {
3135
self.title = title
3236
self.message = message
37+
self.showAlertIcon = showAlertIcon
3338
self.buttons = buttons
3439
}
3540
}

TnT/Projects/DesignSystem/Sources/Components/PopUp/TPopUpAlertView.swift

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,20 @@ public struct TPopUpAlertView: View {
2323
VStack(spacing: 20) {
2424
// 텍스트 Section
2525
VStack(spacing: 8) {
26-
Text(alertState.title)
27-
.typographyStyle(.heading3, with: .neutral900)
28-
.multilineTextAlignment(.center)
29-
.padding(.top, 20)
26+
VStack(spacing: 0) {
27+
if alertState.showAlertIcon {
28+
Image(.icnWarning)
29+
.resizable()
30+
.frame(width: 80, height: 80)
31+
} else {
32+
Color.clear
33+
.frame(height: 20)
34+
}
35+
Text(alertState.title)
36+
.typographyStyle(.heading3, with: .neutral900)
37+
.multilineTextAlignment(.center)
38+
}
39+
3040
if let message = alertState.message {
3141
Text(message)
3242
.typographyStyle(.body2Medium, with: .neutral500)

TnT/Projects/DesignSystem/Sources/Components/PopUp/TPopUpModifier.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public struct TPopUpModifier<InnerContent: View>: ViewModifier {
2323
/// 팝업 그림자의 기본 반경
2424
private let defaultShadowRadius: CGFloat = 10
2525
/// 팝업 콘텐츠의 기본 크기
26-
private let defaultContentSize: CGSize = .init(width: 297, height: 175)
26+
private let defaultContentSize: CGSize = .init(width: 297, height: 151)
2727

2828
/// 팝업에 표시될 내부 콘텐츠 클로저
2929
private let innerContent: () -> InnerContent

0 commit comments

Comments
 (0)