From d730667863e8d97d345c3ba13013f1628044a716 Mon Sep 17 00:00:00 2001 From: kimkyumbi Date: Sat, 18 Nov 2023 23:37:12 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=94=80=20::=20[#84]=20Extension?= =?UTF-8?q?=EC=9D=98=20ButtonWrapper=EC=97=90=20cornerRadius=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Extensions/View+buttonWrapper.swift | 1 + .../LectureOpeningApplyView.swift | 19 +++++++++++++++++++ .../LectureOpeningApplyViewModel.swift | 9 +++++++++ 3 files changed, 29 insertions(+) create mode 100644 App/Sources/Feature/LectureOpeningApplyFeature/LectureOpeningApplyView.swift create mode 100644 App/Sources/Feature/LectureOpeningApplyFeature/LectureOpeningApplyViewModel.swift diff --git a/App/Sources/DesignSystem/Extensions/View+buttonWrapper.swift b/App/Sources/DesignSystem/Extensions/View+buttonWrapper.swift index e03330bb..b23a8be7 100644 --- a/App/Sources/DesignSystem/Extensions/View+buttonWrapper.swift +++ b/App/Sources/DesignSystem/Extensions/View+buttonWrapper.swift @@ -5,5 +5,6 @@ public extension View { Button(action: action) { self } + .cornerRadius(8) } } diff --git a/App/Sources/Feature/LectureOpeningApplyFeature/LectureOpeningApplyView.swift b/App/Sources/Feature/LectureOpeningApplyFeature/LectureOpeningApplyView.swift new file mode 100644 index 00000000..77f513f7 --- /dev/null +++ b/App/Sources/Feature/LectureOpeningApplyFeature/LectureOpeningApplyView.swift @@ -0,0 +1,19 @@ +// +// LectureOpeningApplyView.swift +// Bitgouel +// +// Created by Mac on 11/17/23. +// Copyright © 2023 team.msg. All rights reserved. +// + +import SwiftUI + +struct LectureOpeningApplyView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + LectureOpeningApplyView() +} diff --git a/App/Sources/Feature/LectureOpeningApplyFeature/LectureOpeningApplyViewModel.swift b/App/Sources/Feature/LectureOpeningApplyFeature/LectureOpeningApplyViewModel.swift new file mode 100644 index 00000000..af9c4992 --- /dev/null +++ b/App/Sources/Feature/LectureOpeningApplyFeature/LectureOpeningApplyViewModel.swift @@ -0,0 +1,9 @@ +// +// LectureOpeningApplyView.swift +// Bitgouel +// +// Created by Mac on 11/17/23. +// Copyright © 2023 team.msg. All rights reserved. +// + +import Foundation From 7caddee04b4c3d8c697943b1e2940fa973184f9d Mon Sep 17 00:00:00 2001 From: kimkyumbi Date: Sun, 19 Nov 2023 03:19:06 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=94=A5=20::=20AssociationsSelectButto?= =?UTF-8?q?n,=20AssociationsSelectButtonStyle=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AssociationsSelectButton.swift | 31 ------------- .../AssociationsSelectButtonStyle.swift | 46 ------------------- .../CommonSignUpView.swift | 4 +- 3 files changed, 2 insertions(+), 79 deletions(-) delete mode 100644 App/Sources/DesignSystem/Button/AssociationSelectButton/AssociationsSelectButton.swift delete mode 100644 App/Sources/DesignSystem/Button/AssociationSelectButton/AssociationsSelectButtonStyle.swift diff --git a/App/Sources/DesignSystem/Button/AssociationSelectButton/AssociationsSelectButton.swift b/App/Sources/DesignSystem/Button/AssociationSelectButton/AssociationsSelectButton.swift deleted file mode 100644 index 12b300b0..00000000 --- a/App/Sources/DesignSystem/Button/AssociationSelectButton/AssociationsSelectButton.swift +++ /dev/null @@ -1,31 +0,0 @@ -import SwiftUI - -public struct AssociationsSelectButton: View { - var text: String - var style: SelectButtonStyleType - var action: () -> Void - - public init( - text: String, - style: SelectButtonStyleType = .select, - action: @escaping () -> Void = {} - - ) { - self.text = text - self.style = .select - self.action = action - } - - public var body: some View { - HStack { - - Text(text) - .padding(.horizontal, 20) - .padding(.vertical, 16) - - Spacer() - } - .buttonWrapper(action) - .buttonStyle(AssociationsSelectButtonStyle(style: style)) - } -} diff --git a/App/Sources/DesignSystem/Button/AssociationSelectButton/AssociationsSelectButtonStyle.swift b/App/Sources/DesignSystem/Button/AssociationSelectButton/AssociationsSelectButtonStyle.swift deleted file mode 100644 index 46edf240..00000000 --- a/App/Sources/DesignSystem/Button/AssociationSelectButton/AssociationsSelectButtonStyle.swift +++ /dev/null @@ -1,46 +0,0 @@ -import SwiftUI - -public extension AssociationsSelectButton { - enum SelectButtonStyleType { - case select - } -} - -public struct AssociationsSelectButtonStyle: ButtonStyle { - var style: AssociationsSelectButton.SelectButtonStyleType - - public func makeBody(configuration: Configuration) -> some View { - switch style { - case .select: - SelectButton(configuration: configuration) - } - } -} - -private extension AssociationsSelectButtonStyle { - struct SelectButton: View { - let configuration: ButtonStyle.Configuration - var foregroundColor: Color { - configuration.isPressed ? .black : .bitgouel(.greyscale(.g4)) - } - - var backgroundColor: Color { - .white - } - - var strokeColor: Color { - configuration.isPressed ? .bitgouel(.primary(.p5)) : .bitgouel(.greyscale(.g7)) - } - - var body: some View { - configuration.label - .bitgouelFont(.text2) - .foregroundColor(foregroundColor) - .background(backgroundColor) - .overlay { - RoundedRectangle(cornerRadius: 8) - .stroke(strokeColor, lineWidth: 1) - } - } - } -} diff --git a/App/Sources/Feature/CommonSignUpFeature/CommonSignUpView.swift b/App/Sources/Feature/CommonSignUpFeature/CommonSignUpView.swift index 6eca11d7..40fb8690 100644 --- a/App/Sources/Feature/CommonSignUpFeature/CommonSignUpView.swift +++ b/App/Sources/Feature/CommonSignUpFeature/CommonSignUpView.swift @@ -30,7 +30,7 @@ public struct CommonSignUpView: View { if !viewModel.association.isEmpty { VStack { - AssociationsSelectButton( + AssociationSelectButton( text: viewModel.jobType ) { if viewModel.association == "학교" { @@ -45,7 +45,7 @@ public struct CommonSignUpView: View { } VStack { - AssociationsSelectButton( + AssociationSelectButton( text: viewModel.associationType ) { isAssociation.toggle() From 6277a785753e03ad9e58df2c4a4bbebd3039e099 Mon Sep 17 00:00:00 2001 From: kimkyumbi Date: Sun, 19 Nov 2023 23:48:42 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DesignSystem/Button/BitgouelButton/BitgouelButton.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App/Sources/DesignSystem/Button/BitgouelButton/BitgouelButton.swift b/App/Sources/DesignSystem/Button/BitgouelButton/BitgouelButton.swift index 1e9599aa..120cdcb0 100644 --- a/App/Sources/DesignSystem/Button/BitgouelButton/BitgouelButton.swift +++ b/App/Sources/DesignSystem/Button/BitgouelButton/BitgouelButton.swift @@ -12,7 +12,7 @@ public struct BitgouelButton: View { ) { self.text = text - self.style = .primary + self.style = style self.action = action } From 441e2686040e86edabfd96e64815f74c56c4a6ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EA=B2=B8=EB=B9=84?= <130046132+kimkyumbi@users.noreply.github.com> Date: Mon, 20 Nov 2023 16:14:09 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=94=A5=20::=20=EA=B4=80=EB=A0=A8=20?= =?UTF-8?q?=EC=97=86=EB=8A=94=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LectureOpeningApplyView.swift | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 App/Sources/Feature/LectureOpeningApplyFeature/LectureOpeningApplyView.swift diff --git a/App/Sources/Feature/LectureOpeningApplyFeature/LectureOpeningApplyView.swift b/App/Sources/Feature/LectureOpeningApplyFeature/LectureOpeningApplyView.swift deleted file mode 100644 index 77f513f7..00000000 --- a/App/Sources/Feature/LectureOpeningApplyFeature/LectureOpeningApplyView.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// LectureOpeningApplyView.swift -// Bitgouel -// -// Created by Mac on 11/17/23. -// Copyright © 2023 team.msg. All rights reserved. -// - -import SwiftUI - -struct LectureOpeningApplyView: View { - var body: some View { - Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) - } -} - -#Preview { - LectureOpeningApplyView() -} From 3df026a677ae5a770ff37e31bb74fc072c0ac10b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EA=B2=B8=EB=B9=84?= <130046132+kimkyumbi@users.noreply.github.com> Date: Mon, 20 Nov 2023 16:14:31 +0900 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=94=A5=20::=20=EA=B4=80=EB=A0=A8=20?= =?UTF-8?q?=EC=97=86=EB=8A=94=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LectureOpeningApplyViewModel.swift | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 App/Sources/Feature/LectureOpeningApplyFeature/LectureOpeningApplyViewModel.swift diff --git a/App/Sources/Feature/LectureOpeningApplyFeature/LectureOpeningApplyViewModel.swift b/App/Sources/Feature/LectureOpeningApplyFeature/LectureOpeningApplyViewModel.swift deleted file mode 100644 index af9c4992..00000000 --- a/App/Sources/Feature/LectureOpeningApplyFeature/LectureOpeningApplyViewModel.swift +++ /dev/null @@ -1,9 +0,0 @@ -// -// LectureOpeningApplyView.swift -// Bitgouel -// -// Created by Mac on 11/17/23. -// Copyright © 2023 team.msg. All rights reserved. -// - -import Foundation