Skip to content
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

[Feature] 베지어 스위치 구현 #85

Merged

Conversation

bonoogi
Copy link
Contributor

@bonoogi bonoogi commented Nov 20, 2024

기본적인 베지어 스위치를 구현합니다

@bonoogi bonoogi added the PR:Reviewable Improvements or additions to documentation label Nov 20, 2024
@bonoogi bonoogi requested a review from solchan87 November 20, 2024 04:55
@bonoogi bonoogi self-assigned this Nov 20, 2024
Copy link
Contributor

@solchan87 solchan87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

작업 감사합니다!

Comment on lines +15 to +16
let label: String
let isOn: Binding<Bool>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let label: String
let isOn: Binding<Bool>
private let label: String
private let isOn: Binding<Bool>

}

public var body: some View {
HStack(alignment: .top) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spacing이 빠져있어요. SwiftUI HStack에 spacing 값이 없으면 12정도 값이 들어가더라구요

HStack(alignment: .top) {
Text(self.label)
.applyBezierFontStyle(.caption1Regular, bezierColor: .fgBlackDarkest)
.frame(minHeight: 40)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metric 에 추가해서 써야될 것 같아요

}
.animation(.easeInOut(duration: 0.3), value: self.isOn)
.padding(2)
.compositingGroup()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.compositingGroup()
.applyDisabledStyle()

Disable을 고려해서 요 모디파이어를 써주시면 좋을 것 같아요

import SwiftUI

public struct BezierSwitchControl: View {
@Binding public var isOn: Bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@Binding public var isOn: Bool
@Binding private var isOn: Bool


public var body: some View {
ZStack(alignment: self.alignment) {
RoundedRectangle(cornerRadius: 100.0, style: .circular)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capsule을 쓰면 좋을 것 같아요.

@solchan87 solchan87 merged commit f312203 into channel-io:feature/redesign_bezier Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR:Reviewable Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants