-
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
merge :: 디자인 시스템 - RadioButton #31
Conversation
public struct DMSRadioButton: View { | ||
|
||
@Binding var isOn: Bool | ||
@Binding var isDisabeld: 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.
disabled를 binding으로 받는 특별한 이유가 있을까요?
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.
@Environment(.isEnabled)로 isEnabled상태를 받을 수 있으니 이거 쓰시는게 어떤가요
Projects/UsertInterfaces/DesignSystem/Sources/RadioButton/DMSRadioButton.swift
Outdated
Show resolved
Hide resolved
Projects/UsertInterfaces/DesignSystem/Sources/RadioButton/DMSRadioButton.swift
Outdated
Show resolved
Hide resolved
Projects/UsertInterfaces/DesignSystem/Sources/RadioButton/DMSRadioButton.swift
Outdated
Show resolved
Hide resolved
Projects/UsertInterfaces/DesignSystem/Sources/RadioButton/DMSRadioButton.swift
Outdated
Show resolved
Hide resolved
Projects/UsertInterfaces/DesignSystem/Sources/RadioButton/DMSRadioButton.swift
Outdated
Show resolved
Hide resolved
Projects/UsertInterfaces/DesignSystem/Sources/RadioButton/DMSRadioButton.swift
Outdated
Show resolved
Hide resolved
Projects/UsertInterfaces/DesignSystem/Sources/RadioButton/DMSRadioButton.swift
Outdated
Show resolved
Hide resolved
Projects/UsertInterfaces/DesignSystem/Sources/RadioButton/DMSRadioButton.swift
Outdated
Show resolved
Hide resolved
Projects/UsertInterfaces/DesignSystem/Sources/RadioButton/RadioButton+RadioButtonState.swift
Outdated
Show resolved
Hide resolved
… feat/29_design-system-RadioButton
Circle() | ||
.fill(Color.PrimaryVariant.primary) | ||
.frame(width: 10, height: 10) | ||
}.disabled(isEnabled) |
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.
disabled여기에 안붙이여도 실제 사용할 때
DMSRadioButton(isOn: $isOn)
.disabled(true)
이런식으로 써서 사용되니 빼주셔도 될거같아요
}.disabled(isEnabled) | |
} |
Circle() | ||
.fill(Color.PrimaryVariant.primary) | ||
.frame(width: 20, height: 20) | ||
.clipShape(Circle()) | ||
Circle() | ||
.fill(Color.white) | ||
.frame(width: 15, height: 15) | ||
Circle() | ||
.fill(Color.PrimaryVariant.primary) | ||
.frame(width: 10, height: 10) |
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.
Circle() | |
.fill(Color.PrimaryVariant.primary) | |
.frame(width: 20, height: 20) | |
.clipShape(Circle()) | |
Circle() | |
.fill(Color.white) | |
.frame(width: 15, height: 15) | |
Circle() | |
.fill(Color.PrimaryVariant.primary) | |
.frame(width: 10, height: 10) | |
Circle() | |
.fill(Color.PrimaryVariant.primary) | |
.frame(width: 20, height: 20) | |
Circle() | |
.fill(Color.white) | |
.frame(width: 15, height: 15) | |
Circle() | |
.fill(Color.PrimaryVariant.primary) | |
.frame(width: 10, height: 10) |
Apple Tutorial 식의 코드 공백 View 사이사이에 공백 주시면 됩니다. ViewBuilder Closure위 아래에는 공백 안주는 식입니다
개요
RadioButton 구현
사용방법