-
Notifications
You must be signed in to change notification settings - Fork 0
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
π :: DesignSystem SMSDialog μ μ #38
Conversation
νλ©΄μ λμ°λ modifierλ λ§λ€μ΄μ£ΌμΈμ |
β¦ialog-design-system
β¦ialog-design-system
λ§λ€μμ΅λλΉ |
checkAction: @escaping () -> Void = {}, | ||
cancelAction: @escaping () -> Void = {}, | ||
isShowing: Binding<Bool> |
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.
BIndingμ΄ closureλ³΄λ€ μμ μ€κ² νλκ±° μ΄λ€κ°μ? trailingClosureμ νΉμ§λλ¬Έμ closureλ₯Ό λ€μͺ½μ λλκ² μ’μκ±°κ°μμ
text: String = "", | ||
style: CTAButton.CTAStyle = .default, | ||
action: @escaping () -> Void = { } | ||
) { | ||
self.text = text | ||
self.style = style | ||
self.action = action | ||
} | ||
|
||
let id: String = UUID().uuidString | ||
let text: String? | ||
let style: CTAButton.CTAStyle? | ||
let action: (() -> Void)? |
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.
νλ‘νΌν°κ° μ μ΅μ λμΈκ°μ?
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.
μ μμ νμμ΅λλ€
public init( | ||
text: String = "", | ||
style: CTAButton.CTAStyle = .default, | ||
action: @escaping () -> Void = { } | ||
) { | ||
self.text = text | ||
self.style = style | ||
self.action = action | ||
} | ||
|
||
let id: String = UUID().uuidString | ||
let text: String? | ||
let style: CTAButton.CTAStyle? | ||
let action: (() -> Void)? |
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.
initμ΄λ νλ‘νΌν° μμλ λ°κΏμΌν κ±°κ°μμ
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.
μμ νμμ΅λλ€
alertAction: [SMSAlertButtonType], | ||
isShowing: Binding<Bool> |
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.
isShowingμ΄λ alertActionμ΄λ νλΌλ―Έν° μμ λ°κΎΈλκ±° μ΄λ€κ°μ? actionμ λ°°μ΄λ‘ μ¬λΏ λ°μ μ μμΌλ λ€μ μλκ² λμ보μμ΅λλ€
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.
μμ νμμ΅λλ€
func smsAlert( | ||
title: String, | ||
description: String, | ||
alertAction: [SMSAlertButtonType], |
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.
arrayλ alertActionsλ‘ λ³΅μ μ§μΉνλκ±° μ΄λ€κ°μ
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.
μμ νμμ΅λλΉ
.padding(40) | ||
.transition( |
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.
ν μ€ μ€λ°κΏ νλκ² μ€νμΌ κ°μ΄λμ λ§μκ±°κ°μμ¬
public struct SMSAlertButtonType: Hashable { | ||
public static func == (lhs: SMSAlertButtonType, rhs: SMSAlertButtonType) -> Bool { | ||
lhs.id == rhs.id | ||
} | ||
|
||
public func hash(into hasher: inout Hasher) { | ||
hasher.combine(id) | ||
} |
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.
μ΄ μΉκ΅¬ ForEachμμ μ¬μ©νκΈ° μν΄μ Hashable μ€μνλλ‘ ν건κ°μ?
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.
λ§μ½ κ·Έλ λ€λ©΄ Identifiableλ₯Ό μ€μνλλ‘ νλκ² μ΄λ€κ°μ?
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.
μμ νμμ΅λλ€
Co-authored-by: baegteun <baegteun@gmail.com>
π‘ κ°μ
DesignSystem SMSDialog μ μ
π μμ λ΄μ©
DesignSystem SMSDialog μ μ