Skip to content

Commit

Permalink
✨ :: [#62] Add Training + Feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Xixn2 committed Nov 14, 2024
1 parent c388d98 commit f9a7af2
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "grayXButton.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "plusBlue.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ struct ExpoEditView: View {
@State private var titleTextField: String = ""
@State private var descriptionTextField: String = ""
@State private var date: [String] = ["", ""]
@State private var trainingCount: [String] = [""]
@State private var selectedImage: UIImage? = nil
@State private var isImagePickerPresented = false

Expand Down Expand Up @@ -59,8 +60,6 @@ struct ExpoEditView: View {
}
.padding(.top, 7.5)
}


}

HStack(spacing: 6) {
Expand Down Expand Up @@ -145,8 +144,59 @@ struct ExpoEditView: View {
.expoFont(.caption2R)
.expoColor(ExpoColor.main)
}
Spacer()

Text("연수 종류")
.expoFont(.body2B)
.padding(.leading, 14)
.padding(.top, 28)
.padding(.bottom, 8)

VStack(spacing: 0) {
ForEach(trainingCount.indices, id: \.self) { index in
HStack(spacing: 0) {
Text("\(index + 1)")
.padding(.leading, 32)
.expoColor(ExpoColor.gray500)

TextField("연수를 입력해주세요.", text: $trainingCount[index])
.padding(.leading, 12)

Spacer()

Button {
if trainingCount.count > 1 {
trainingCount.remove(at: index)
}
} label: {
ExpoIOSAsset.Assets.grayXButton.swiftUIImage
.padding(.trailing, 32)
}
}
.expoFont(.body2R)
.padding(.bottom, 34)
}

Button {
trainingCount.append("")
} label: {
HStack(spacing: 8) {
ExpoIOSAsset.Assets.plusBlue.swiftUIImage
Text("추가하기")
.expoFont(.caption1B)
.expoColor(ExpoColor.main300)
}
.padding(.bottom, 26)
}
}
.padding(.top, 26)
.overlay {
RoundedRectangle(cornerRadius: 8)
.strokeBorder(ExpoColor.gray300.swiftUIColor)
.padding(.horizontal, 16)

}

Spacer()
}
.sheet(isPresented: $isImagePickerPresented) {
ImagePicker(selectedImage: $selectedImage)
Expand Down

0 comments on commit f9a7af2

Please sign in to comment.